|
|
|
@ -5,6 +5,7 @@ const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin') |
|
|
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin') |
|
|
|
|
const { ContextReplacementPlugin } = require('webpack') |
|
|
|
|
const glob = require('glob') |
|
|
|
|
const webpack = require('webpack') |
|
|
|
|
|
|
|
|
|
function transpileViewScript(file) { |
|
|
|
|
return { |
|
|
|
@ -136,7 +137,10 @@ const appJs = |
|
|
|
|
filename: '../css/[name].css' |
|
|
|
|
}), |
|
|
|
|
new CopyWebpackPlugin([{ from: 'static/', to: '../' }]), |
|
|
|
|
new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/) |
|
|
|
|
new ContextReplacementPlugin(/moment[\/\\]locale$/, /en/), |
|
|
|
|
new webpack.DefinePlugin({ |
|
|
|
|
'process.env.SOCKET_ROOT': JSON.stringify(process.env.SOCKET_ROOT || '') |
|
|
|
|
}) |
|
|
|
|
] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|