This repository has been archived by the owner on Mar 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Explanation: microsoft/TypeScript#16675
- Loading branch information
Showing
2 changed files
with
3 additions
and
13 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 |
---|---|---|
@@ -1,13 +1,3 @@ | ||
### Typescript dynamic import | ||
### Typescript dynamic import example | ||
|
||
I get error `Dynamic import cannot be used when targeting ECMAScript 2015 modules.` | ||
when I try to use dynamic import inside typescript project with `"module": "es2015"` | ||
in configuration. The error message makes it clear that I can't use `import()` with | ||
es modules but it doesn't make sense because `import()` is part of es modules. | ||
|
||
However, it compiles correctly but throw annoing error. | ||
|
||
You can check typescript output by running `npm run build-ts`. Compiled files | ||
will be in `build/` folder. | ||
And also you can check that webpack process it correctly by running `npm run build-webpack` | ||
and opening `index.html` | ||
See source code |
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