feat: production server build

This commit is contained in:
cha0s 2019-05-05 04:27:18 -05:00
parent c7529b1fd8
commit 74b605ea75

View File

@ -2,8 +2,10 @@ const path = require('path');
const webpack = require('webpack');
const isProduction = !!process.argv.find((arg) => '--production' === arg);
const config = {
mode: 'development',
mode: isProduction ? 'production' : 'development',
module: {
rules: [
{
@ -53,6 +55,7 @@ const config = {
],
},
output: {
// Worker happiness.
globalObject: `(typeof self === 'undefined' ? this : self)`,
path: path.resolve(__dirname, 'dist'),
filename: '[name].js',