mirror of
https://github.com/kevin-DL/sapper-template.git
synced 2026-01-15 19:44:48 +00:00
update to webpack 4
This commit is contained in:
@@ -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
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user