joyent-portal/frontend/webpack/development.js
Sérgio Ramos 6d5922e399 improve webpack config
- better stack traces
- disable hmr (for now)
- runtime eslint
- remove all async/await stuff (untill we actually need it)
- reaload when modules change
- show full path in compiled requires
- ignore node dependencies
- don't instantiate plugins unless required
2017-02-07 15:54:35 +00:00

45 lines
929 B
JavaScript

// const graphql = require('../../cloudapi-graphql/src/endpoint');
const plugins = require('./plugins');
const base = require('./base');
const devServer = {
hot: true,
quiet: true,
clientLogLevel: 'none',
compress: true,
lazy: false,
publicPath: base.output.publicPath,
setup: (app) => {
// app.use('/graphql', graphql);
},
historyApiFallback: {
index: './static/index.html'
},
watchOptions: {
ignored: /node_modules/
}
};
module.exports = Object.assign(base, {
devtool: 'cheap-module-source-map',
entry: [
'react-dev-utils/webpackHotDevClient',
base.entry
],
plugins: base.plugins.concat([
plugins['named-modules'](),
plugins['hot-module-replacement'](),
plugins['watch-missing-node-modules'](),
plugins['case-sensitive-paths']()
]),
node: {
fs: 'empty',
net: 'empty',
tls: 'empty'
},
performance: {
hints: false
},
devServer
});