Last active
November 2, 2017 14:00
-
-
Save koenverburg/364bb977c08a82e3ae7eb0f6f259c686 to your computer and use it in GitHub Desktop.
webpack dll
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
// https://github.com/webpack/webpack/tree/master/examples/dll-user | |
// https://blog.hobbytrace.com/injecting-webpack-2-dll-with-hash-to-html-via-html-webpackplugin/ | |
// read https://github.com/webpack/docs/wiki/list-of-plugins#dllreferenceplugin | |
// https://github.com/lettertwo/appcache-webpack-plugin | |
// https://github.com/NekR/offline-plugin | |
module.exports = { | |
entry: { | |
vendor: [path.join(__dirname, 'app', 'vendors.js')] | |
}, | |
output: { | |
path: path.join(__dirname, 'dist', 'dll'), | |
filename: 'dll.[name].js', | |
library: '[name]' | |
}, | |
plugins: [ | |
new webpack.DllPlugin({ | |
path: path.join(__dirname, 'dist', 'dll', '[name]-manifest.json'), | |
name: '[name]', | |
context: path.resolve(__dirname, 'client') | |
}), | |
] | |
}; | |
// sails | |
// sails generate api user index(all) show(one) create(one) update(one) destroy(one) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment