update to webpack 4

This commit is contained in:
Rich Harris
2018-03-04 12:02:35 -05:00
parent 5507bf67b1
commit e0090de549
5 changed files with 21 additions and 47 deletions

View File

@@ -2,14 +2,16 @@ const config = require('sapper/webpack/config.js');
const webpack = require('webpack');
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const pkg = require('../package.json');
module.exports = {
entry: config.server.entry(),
output: config.server.output(),
target: 'node',
resolve: {
extensions: ['.js', '.html', '.json']
extensions: ['.js', '.json', '.html']
},
externals: Object.keys(pkg.dependencies),
module: {
rules: [
{
@@ -26,5 +28,9 @@ module.exports = {
}
}
]
},
mode: process.env.NODE_ENV,
performance: {
hints: false // it doesn't matter if server.js is large
}
};