Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
babel-plugin-dynamic-import-webpack
Advanced tools
Babel plugin to transpile import() to require.ensure, for Webpack
Babel plugin to transpile import()
to require.ensure
, for Webpack.
Note that Webpack 2 has gotten import()
after this code was written.
NOTE: Babylon v6.12.0 is required to correctly parse dynamic imports.
$ npm install babel-plugin-dynamic-import-webpack --save-dev
.babelrc
(Recommended).babelrc
{
"plugins": ["dynamic-import-webpack"]
}
$ babel --plugins dynamic-import-webpack script.js
require("babel-core").transform("code", {
plugins: ["dynamic-import-webpack"]
});
Although the specification for import()
supports a dynamic importing of modules in the browser runtime, webpack's require.ensure()
is not dynamic and requires a hardcoded string to work correctly. For more information see webpack's documentation on dynamic requires.
v1.1.0
FAQs
Babel plugin to transpile import() to require.ensure, for Webpack
The npm package babel-plugin-dynamic-import-webpack receives a total of 17,940 weekly downloads. As such, babel-plugin-dynamic-import-webpack popularity was classified as popular.
We found that babel-plugin-dynamic-import-webpack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.