Comments (2)
Question: why do you use this plugin with webpack? Webpack natively supports dynamic import.
Also, we tried thinking about a solution that respects the dynamic import semantics (i.e. the import argument is evaluated synchronously) and works with webpack (even if this plugin shouldn't be used with webpack), but we couldn't find it.
i.e.
let i = 0;
import(`./file-${i++}.js`);
console.log(i);
it should log 1
and import file-0.js
.
from babel-plugin-dynamic-import-node.
Question: why do you use this plugin with webpack? Webpack natively supports dynamic import.
Also, we tried thinking about a solution that respects the dynamic import semantics (i.e. the import argument is evaluated synchronously) and works with webpack (even if this plugin shouldn't be used with webpack), but we couldn't find it.
i.e.
let i = 0; import(`./file-${i++}.js`); console.log(i);it should log
1
and importfile-0.js
.
Doh! I can't figure out a reason why. Removed it and now we don't have problem anymore. Thanks :)
from babel-plugin-dynamic-import-node.
Related Issues (20)
- Inconsistency with Webpack v4 HOT 16
- Version 10 of node.js has been released
- vulnerabilities found via npm install HOT 1
- Error Unknown plugin "dynamic-import-node" specified in "base" at 1, HOT 16
- Repository out of sync with published version in npm? HOT 3
- `babel-plugin-syntax-dynamic-import` vs `babel-plugin-dynamic-import-node` HOT 4
- Update to Babel 7 HOT 3
- Version 2.1.0 not on npm HOT 6
- Bring the file suffix name, the compilation result cannot be executed HOT 2
- An in-range update of eslint-plugin-import is breaking the build 🚨 HOT 2
- missing support for query params and fragments HOT 3
- No description in github releases HOT 1
- how to compile to one file HOT 3
- An in-range update of eslint-plugin-import is breaking the build 🚨 HOT 3
- `import()` argument shouldn't be evaluated in the arrow scope HOT 6
- v2.3.1 introduced a breaking change HOT 1
- Critical dependency: the request of a dependency is an expression HOT 9
- How should we deal with module attributes? HOT 1
- Specifier should not be resolved HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from babel-plugin-dynamic-import-node.