-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[dynamic import](https://github.com/tc39/proposal-dynamic-import) support has just landed in [Rollup 0.55.0](https://github.com/rollup/rollup/blob/master/CHANGELOG.md#upcoming-0550). When testing a project that uses nodent via rollup-plugin-nodent, I noticed that it doesn't support dynamic import yet, resulting in the error ``` SyntaxError: Unexpected token in ... ``` Looking at the [rollup source code](https://github.com/rollup/rollup/blob/089c9e06190b894d766fc44571752fa91dc1eaa5/src/Graph.ts#L3), I see that they are using [acorn-dynamic-import](https://github.com/kesne/acorn-dynamic-import). This patches the acorn version that is used in nodent to add the acorn-dynamic-import plugin as done in rollup itself. That way, the nodent compiler is able to parse code that uses dynamic import. This is quite similar to what has been done for [buble](bublejs/buble#102). Also switch from xo to eslint and eslint-config/plugin-*
- Loading branch information
Showing
4 changed files
with
1,359 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"plugins": [ | ||
"unicorn", | ||
"import" | ||
], | ||
"extends": [ | ||
"xo/esnext", | ||
"plugin:unicorn/recommended", | ||
"plugin:import/recommended" | ||
], | ||
"rules": { | ||
"import/no-unresolved": ["error", { commonjs: true }] | ||
}, | ||
"parserOptions": { | ||
"sourceType": "script" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.