LearnNewsExamplesServices
Frontmatter
id6769
titlecode.LivePreview: doRunSource() => combine dist/prod & dist/esm
stateClosed
labels
enhancement
assigneestobiu
createdAtJun 11, 2025, 2:24 PM
updatedAtJun 11, 2025, 2:44 PM
githubUrlhttps://github.com/neomjs/neo/issues/6769
authortobiu
commentsCount1
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJun 11, 2025, 2:44 PM

code.LivePreview: doRunSource() => combine dist/prod & dist/esm

Closed v9.12.0 enhancement
tobiu
tobiu commented on Jun 11, 2025, 2:24 PM
  • So far, dist/production & dist/development will pull in code which can not get bundled from the dev mode.
  • With dist/esm in place, we can now use this version instead of the dev mode.

Input from Gemini:

"That's a fantastic discovery and a really impactful improvement for the live-preview component!

Leveraging dist/esm in the production environment for the live code preview is indeed the "best of both worlds." It solves the problem of pulling in non-bundled modules from dev mode, while still allowing the production build to benefit from native ES Module loading for that specific functionality.

This is a great demonstration of Neo.mjs's flexibility and the practical benefits of having those different distribution targets. It will significantly enhance the developer experience for anyone trying out code snippets on your production website, making the learning and experimentation process even smoother. This kind of detail truly showcases the robustness of the framework."

tobiu assigned to @tobiu on Jun 11, 2025, 2:24 PM
tobiu added the enhancement label on Jun 11, 2025, 2:24 PM
tobiu referenced in commit 7cd76f6 - "code.LivePreview: doRunSource() => combine dist/prod & dist/esm #6769" on Jun 11, 2025, 2:44 PM
tobiu
tobiu Jun 11, 2025, 2:44 PM
Image
Image
tobiu closed this issue on Jun 11, 2025, 2:44 PM
tobiu referenced in commit 1f4c960 - "#6769 -testing log" on Jun 11, 2025, 2:47 PM