Skip to content
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

Stop browserify from evaluating dynamic imports ( import() ) and crashing? #2075

Open
blaasvaer opened this issue Mar 19, 2024 · 3 comments
Open

Comments

@blaasvaer
Copy link

If I pass a path relative to what's build on the server Browserify will fail during build.

How can I prevent Browserify form evaluating dynamic import – and crash in the process without having to replicate the entire src folder structure on the live server?

@mikixing

This comment was marked as spam.

@blaasvaer

This comment was marked as off-topic.

@goto-bus-stop
Copy link
Member

Browserify doesn't support ESM, including dynamic imports. It doesn't do anything to them so they end up in the output bundle unless you use a transform like babelify.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants