Skip to content

Bug: Sub-Application chunk.js Throws Error Uncaught SyntaxError: Unexpected token 'export' #350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
walkerkay opened this issue Mar 17, 2025 · 0 comments

Comments

@walkerkay
Copy link
Contributor

walkerkay commented Mar 17, 2025

Describe the bug
When loading the sub-application, the chunk.js file throws the error "Uncaught SyntaxError: Unexpected token 'export'".

Possible cause
In the sub-application's index.html, the chunk is loaded via: <link rel="modulepreload" href="chunk.js"> ,however, after loading through ngx-planet, it became <script type="text/javaScript" src="chunk. js"></script>, and did not add type="module" to support module loading, so an Unexpected token 'export' exception was thrown.

walkerkay pushed a commit that referenced this issue Mar 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant