-
Notifications
You must be signed in to change notification settings - Fork 906
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
Dynamic import is not working (SyntaxError: Unexpected token) #970
Comments
You have to specify |
10 tasks
kodiakhq bot
pushed a commit
to vercel/next.js
that referenced
this issue
Nov 5, 2021
- Code splitting should be disabled for the server-web build. Done via `ServerlessPlugin`. - ~Target can't be `web`, `webworker` is better.~ Using `web` and `es6` for now, still not ideal. - acornjs/acorn#970 ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
natew
pushed a commit
to natew/next.js
that referenced
this issue
Feb 16, 2022
…30972) - Code splitting should be disabled for the server-web build. Done via `ServerlessPlugin`. - ~Target can't be `web`, `webworker` is better.~ Using `web` and `es6` for now, still not ideal. - acornjs/acorn#970 ## Bug - [ ] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [ ] Make sure the linting passes by running `yarn lint`
And WHERE do one specify ecmaVersion: 11? I'm using Browserify with Babel and have no clue where to configure specifically for Acorn. I would expect to do all my configuring at the Browserify/Babel level and not at the level of some obscure and deeply nested dependency? |
Babel does not use Acorn, consult the docs of libraries you actually use. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Seems like acorn is not supporting dynamic import statements. I saw issue #809, but i'm not sure if this is related, because some comments say something about a dependency to npm, but i can reproduce it without npm.
How to reproduce
Output
Version
node v12.18.2
acorn 7.3.1
The text was updated successfully, but these errors were encountered: