Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tuchk4/webpack-code-splitter
Webpack code splitter (by file system paths,no matter where module was imported)
https://github.com/tuchk4/webpack-code-splitter
Last synced: 20 days ago
JSON representation
Webpack code splitter (by file system paths,no matter where module was imported)
- Host: GitHub
- URL: https://github.com/tuchk4/webpack-code-splitter
- Owner: tuchk4
- Created: 2016-01-12T10:20:52.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-24T10:04:43.000Z (over 7 years ago)
- Last Synced: 2024-10-11T00:25:36.057Z (about 1 month ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Webpack code splitter plugin
## Install
`npm install --save webpack-code-splitter`
```js
import WebpackCodeSplitter from 'webpack-code-splitter';let webpackCodeSplitterPlugin = new WebpackCodeSplitter([
// every module from node_module or bower_components will be placed into js/vendor.js output build script
{
name: 'js/vendor',
path: ['node_modules/', 'bower_components/'],
},
// for bootstrap module - will be separated build script
{
name: 'js/bootstrap',
path: '\/bootstrap\\.js'
},
// all jade and html template will be placed into js/templates.js output build scirpt
{
name: 'js/templates',
path: '.+\\.(jade|html)'
}
]);webpack.config.plugins.push(webpackCodeSplitterPlugin);
```