Skip to content

Instantly share code, notes, and snippets.

@koenverburg
Last active November 2, 2017 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koenverburg/364bb977c08a82e3ae7eb0f6f259c686 to your computer and use it in GitHub Desktop.
Save koenverburg/364bb977c08a82e3ae7eb0f6f259c686 to your computer and use it in GitHub Desktop.
webpack dll
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