summaryrefslogtreecommitdiff
path: root/webpack.config.ts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-04-22 19:36:28 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-04-22 19:36:28 +0900
commit6e3ee05cb6b88fce13d1c73aea0085d09cf3f0ba (patch)
tree0f9ce1b9fa890c4f31c0b474758210a1633499c2 /webpack.config.ts
parentNew Crowdin translations (#6281) (diff)
downloadsharkey-6e3ee05cb6b88fce13d1c73aea0085d09cf3f0ba.tar.gz
sharkey-6e3ee05cb6b88fce13d1c73aea0085d09cf3f0ba.tar.bz2
sharkey-6e3ee05cb6b88fce13d1c73aea0085d09cf3f0ba.zip
refactor(client): :sparkles:
Diffstat (limited to 'webpack.config.ts')
-rw-r--r--webpack.config.ts21
1 files changed, 7 insertions, 14 deletions
diff --git a/webpack.config.ts b/webpack.config.ts
index c6dc0dbabe..1c6692da29 100644
--- a/webpack.config.ts
+++ b/webpack.config.ts
@@ -4,10 +4,7 @@
import * as fs from 'fs';
import * as webpack from 'webpack';
-import * as chalk from 'chalk';
const { VueLoaderPlugin } = require('vue-loader');
-const ProgressBarPlugin = require('progress-bar-webpack-plugin');
-const TerserPlugin = require('terser-webpack-plugin');
class WebpackOnBuildPlugin {
constructor(readonly callback: (stats: any) => void) {
@@ -118,10 +115,7 @@ module.exports = {
}]
},
plugins: [
- new ProgressBarPlugin({
- format: chalk` {cyan.bold Yes we can} {bold [}:bar{bold ]} {green.bold :percent} {gray :elapseds}`,
- clear: false
- }),
+ new webpack.ProgressPlugin({}),
new webpack.DefinePlugin({
_VERSION_: JSON.stringify(meta.version),
_LANGS_: JSON.stringify(Object.entries(locales).map(([k, v]: [string, any]) => [k, v._lang_])),
@@ -135,7 +129,6 @@ module.exports = {
output: {
path: __dirname + '/built/client/assets',
filename: `[name].${meta.version}.js`,
- chunkFilename: '[fullhash].[id].js',
publicPath: `/assets/`
},
resolve: {
@@ -149,13 +142,13 @@ module.exports = {
resolveLoader: {
modules: ['node_modules']
},
- externals: {
- moment: 'moment'
- },
- optimization: {
- minimizer: [new TerserPlugin()]
+ cache: {
+ type: 'filesystem',
+
+ buildDependencies: {
+ config: [__filename]
+ }
},
- cache: false,
devtool: false, //'source-map',
mode: isProduction ? 'production' : 'development'
};