From 9d12eaae413901c91ee86e4b6fa4f102f4b36427 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Thu, 21 Jan 2021 22:20:28 +0800 Subject: [PATCH] remove moment locale files --- package-lock.json | 15 +++++++++++++++ package.json | 1 + vue.config.js | 7 +++++++ 3 files changed, 23 insertions(+) diff --git a/package-lock.json b/package-lock.json index efab47c4..16002f90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7082,6 +7082,12 @@ "integrity": "sha512-3j8wdDzYuWO3lM3Reg03MuQR957t287Rpcxp1njpEa8oDrikb+FwGdW3n+FELh/A6qib6yPit0j/pv9G/yeAqA==", "dev": true }, + "lodash.difference": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.difference/-/lodash.difference-4.5.0.tgz", + "integrity": "sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw=", + "dev": true + }, "lodash.kebabcase": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", @@ -7468,6 +7474,15 @@ "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" }, + "moment-locales-webpack-plugin": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/moment-locales-webpack-plugin/-/moment-locales-webpack-plugin-1.2.0.tgz", + "integrity": "sha512-QAi5v0OlPUP7GXviKMtxnpBAo8WmTHrUNN7iciAhNOEAd9evCOvuN0g1N7ThIg3q11GLCkjY1zQ2saRcf/43nQ==", + "dev": true, + "requires": { + "lodash.difference": "^4.5.0" + } + }, "move-concurrently": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz", diff --git a/package.json b/package.json index 11b904c1..29166946 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "eslint": "^6.7.2", "eslint-plugin-vue": "^6.2.2", "git-revision-webpack-plugin": "^3.0.6", + "moment-locales-webpack-plugin": "^1.2.0", "vue-template-compiler": "^2.6.11" }, "eslintConfig": { diff --git a/vue.config.js b/vue.config.js index f1d9ac96..b39cc880 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,4 +1,6 @@ const GitRevisionPlugin = require('git-revision-webpack-plugin'); +const MomentLocalesPlugin = require('moment-locales-webpack-plugin'); + const pkgFile = require('./package.json'); const licenseFile = require('./third-patry-licenses.json'); @@ -19,6 +21,11 @@ module.exports = { }, publicPath: '', productionSourceMap: false, + configureWebpack:{ + plugins: [ + new MomentLocalesPlugin() + ] + }, chainWebpack: config => { config.optimization.splitChunks({ cacheGroups: {