overleaf/services/web/webpack.config.dev.js

46 lines
1,002 B
JavaScript
Raw Normal View History

2018-01-12 11:41:02 +00:00
const merge = require('webpack-merge')
const base = require('./webpack.config')
module.exports = merge(base, {
// Enable source maps for dev (fast compilation, slow runtime)
devtool: 'cheap-module-eval-source-map',
2018-01-12 12:30:20 +00:00
output: {
publicPath: '/public/js/es/'
2018-01-12 12:30:20 +00:00
},
2018-01-12 11:41:02 +00:00
devServer: {
// Disable webpack dev server auto-reload
inline: false,
// Expose dev server as localhost with dev box
host: '0.0.0.0',
// Webpack-rails default port for webpack-dev-server
port: 3808,
// Allow CORS
headers: {
'Access-Control-Allow-Origin': '*'
},
// Customise output to the (node) console
stats: {
colors: true, // Enable some coloured highlighting
timings: true, // Show build timing info
assets: true, // Show output bundles
warnings: true, // Show build warnings
// Hide some overly verbose output
hash: false,
version: false,
chunks: false
}
},
// Disable performance budget warnings as code is uncompressed in dev mode
performance: {
hints: false
}
})