// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
Expected behavior:
It should generate same import statement, because now it cant be used with webpack.
TypeScript Version: 2.4.2 / nightly (2.5.0-dev.201xxxxx)
Code
Dynamic import with concatenation generates invalid code.
If you have in typescript this code
it will generate this javascript
but if you make it more dynamic by doing this
it will generate this javascript
see https://github.com/webpack/webpack/issues/5568 Here is reproduction so you can see it. https://github.com/kukjevov/dynamic-import
Any suggestions?
Expected behavior:
It should generate same
import
statement, because now it cant be used with webpack.Actual behavior: