@rschristian/babel-plugin-webpack-chunk-name-comments
v0.1.2
Published
Babel plugin used to generate Webpack magic comments on dynamic import statements
Downloads
47
Maintainers
Readme
@rschristian/babel-plugin-webpack-chunk-name-comments
A Babel plugin that adds Webpack magic comments to provide chunk names on import()
statements.
Usage
In your babel configuration (.babelrc
, babel.config.json
, etc.) add the plugin:
{
"plugins": [
"@rschristian/babel-plugin-webpack-chunk-name-comments"
]
}
// input:
import("./a.js");
// output:
import(
/*webpackChunkName: "a"*/
"./a.js"
);
For more information on magic comments and how they might be used, see Webpack's docs on the subject.
License
Modified from Widen Enterprises, Inc. MIT
Acknowledgments
Modified version of babel-plugin-dynamic-import-chunk-name
, built specifically for preact-cli