0.1.2 • Published 2 years ago

@rschristian/babel-plugin-webpack-chunk-name-comments v0.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@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

MIT

Modified from Widen Enterprises, Inc. MIT

Acknowledgments

Modified version of babel-plugin-dynamic-import-chunk-name, built specifically for preact-cli