entry-chunk-loader
Webpack loader to generate a new entry chunk.
A fork of spawn-loader
, with a few notable changes:
- Supports Webpack 5.
- Supports native ECMAScript modules of Node.js.
Installation
npm install --save-dev entry-chunk-loader
Usage
ECMAScript modules
// simplest usage: emits otherBundle.js in the same directory;// url === 'otherBundle.js' // build into a subdir: emits otherBundle.js// (and any assets it emits) into childDir/;// url === 'childDir/otherBundle.js' // specify a different name;// url === 'bundle.js' // emit the required file as-is, with no prelude// only useful in combination with other loaders;// url === 'manifest.json'
CommonJS modules
// simplest usage: emits otherBundle.js in the same directoryconst url = ;// url === 'otherBundle.js' // build into a subdir: emits otherBundle.js// (and any assets it emits) into childDir/const url = ;// url === 'childDir/otherBundle.js' // specify a different nameconst url = ;// url === 'bundle.js' // emit the required file as-is, with no prelude// only useful in combination with other loadersconst url = ;// url === 'manifest.json'