Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/guybedford/systemjs-webpack-plugin
Webpack bundling for SystemJS
https://github.com/guybedford/systemjs-webpack-plugin
Last synced: 2 months ago
JSON representation
Webpack bundling for SystemJS
- Host: GitHub
- URL: https://github.com/guybedford/systemjs-webpack-plugin
- Owner: guybedford
- License: mit
- Created: 2016-07-28T12:57:13.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-01T15:34:58.000Z (over 8 years ago)
- Last Synced: 2024-08-29T18:36:19.194Z (4 months ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 28
- Watchers: 6
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Webpack SystemJS Registration Plugin
---Allows Webpack bundles to register specified public modules into the SystemJS loader registry under custom public names.
Also supports configuring SystemJS to automatically load Webpack chunks on-demand when `System.import` is called to lazy load modules.
_This is an experimental integration project, without any support guarantees yet._
Example Configuration
---```javascript
var SystemJSRegisterPublicModules = require('webpack-systemjs-plugin');module.exports = {
entry: './main.js',
plugins: [
new SystemJSRegisterPublicModules({
// automatically configure SystemJS to load webpack chunks (defaults to true)
bundlesConfigForChunks: true,// select which modules to expose as public modules
registerModules: [
// "default" filters provided are "local" and "public"
{ filter: 'public' },// keyname allows a custom naming system for public modules
{
filter: 'local',
keyname: 'app/[relPath]'
},// keyname can be a function
{
filter: 'public',
keyname: (module) => 'publicModule-' + module.id
},// filter can also be a function
{
filter: (m) => m.relPath.match(/src/),
keyname: 'random-naming-system-[id]'
}
]
})
],
output: {
filename: 'out.js'
}
};
````public` modules are main modules from the node_modules folder.
`local` modules are modules not within node_modules.