LearnNewsExamplesServices
Frontmatter
id6737
titlebuildScripts/buildESModules: smarter way to handle node module imports
stateClosed
labels
enhancement
assigneestobiu
createdAtJun 1, 2025, 3:32 PM
updatedAtJun 1, 2025, 3:37 PM
githubUrlhttps://github.com/neomjs/neo/issues/6737
authortobiu
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 1, 2025, 3:37 PM

buildScripts/buildESModules: smarter way to handle node module imports

Closed v9.6.1 enhancement
tobiu
tobiu commented on Jun 1, 2025, 3:32 PM

Inside Portal.view.learn.ContentComponent we have the following top-level import: import {marked} from '../../../../node_modules/marked/lib/marked.esm.js';

This works fine inside the dev mode as well as webpack-based dist envs, but dist/esm can not handle it yet.

  • We need to replace node module related imports for the new env (going 2 folder levels upwards).
  • We need to set the Neo.config.basePath to match the top-level folder.
  • We need to add workerBasePath for the new env.
  • We need to adjust related logic inside the main thread addons
tobiu assigned to @tobiu on Jun 1, 2025, 3:32 PM
tobiu added the enhancement label on Jun 1, 2025, 3:32 PM
tobiu referenced in commit e0b7a0c - "buildScripts/buildESModules: smarter way to handle node module imports #6737" on Jun 1, 2025, 3:32 PM
tobiu closed this issue on Jun 1, 2025, 3:37 PM