Webpack 2.x asset pipeline hook for Sails.js with bug fix
npm install sails-hook-webpack2-bug-fix[![NPM version][npm-image]][npm-url]
Webpack 2.x asset pipeline hook for Sails.js. Added bug fix.
Install this package via npm:
``sh`
npm install --save sails-hook-webpack2-bug-fix
Disable the Sails grunt hook (you can also create your Sails project using the --no-frontend flag):
`js`
// .sailsrc
{
"hooks": {
"grunt": false
}
}
Configure webpack options for your project:
`js
// config/webpack.js
const path = require('path');
module.exports.webpack = {
// webpack options, see https://webpack.js.org/configuration/
options: {
entry: './src/main.js',
output: {
path: path.resolve(__dirname, '../.tmp/public'),
filename: '/js/bundle.js',
publicPath: '/'
}
}
};
`
Don't forget to include /js/bundle.js near the bottom of your views layout:
`
// views/layout.ejs
// ...