1.0.0 • Published 5 years ago
babel-plugin-dynamic-import-chunk-name v1.0.0
babel-plugin-dynamic-import-chunk-name
This plugin will automatically generate webpackChunkName comments for dynamic imports using the imported filename.
Example
In
import("./core/DocumentParser.js")Out
import(/*webpackChunkName: 'core--document-parser'*/ "./core/DocumentParser.js")Installation
npm install --save-dev babel-plugin-dynamic-import-chunk-nameUsage
Add the following to your .babelrc file.
{
"plugins": ["dynamic-import-chunk-name"]
}1.0.0
5 years ago