1.0.7 • Published 7 months ago
babel-plugin-magic-comments v1.0.7
babel-plugin-magic-comments
Babel plugin to add webpack magic comments to your dynamic import()
expressions at build time.
Getting Started
First install babel-plugin-magic-comments
:
npm install babel-plugin-magic-comments
Next add the plugin to your babel.config.js
:
export default () => {
return {
plugins: [
['magic-comments', {
verbose: true,
webpackChunkName: true,
webpackFetchPriority: "high"
}]
]
}
}
Or include it directly in your webpack.config.js
:
module: {
rules: [
{
test: /\.[jt]sx?$/,
use: {
loader: 'babel-loader',
options: {
plugins: [
['magic-comments', {
verbose: true,
webpackChunkName: true,
webpackFetchPriority: "high"
}]
]
}
}
}
]
}
Options
The options are the same as those used by magic-comments-loader
, with the exception of mode
(not supported).
Examples
For some more usage examples you can check out the ones provided by magic-comments-loader
, particularly the loader's options
.
1.0.2
10 months ago
1.0.1
10 months ago
1.0.0
10 months ago
1.0.7
7 months ago
1.0.6
9 months ago
1.0.5
9 months ago
1.0.4
9 months ago
1.0.3
9 months ago
1.0.0-rc.0
10 months ago
1.0.0-alpha.0
10 months ago