Commit 23ef72095f1f9a6e4f986715d676f5793f55ab23
1 parent
d3c7f6f3
chore: remove locales in moment.js
Showing
1 changed file
with
8 additions
and
1 deletions
front-end/h5/vue.config.js
| ... | ... | @@ -2,13 +2,14 @@ |
| 2 | 2 | * @Author: ly525 |
| 3 | 3 | * @Date: 2019-12-14 22:43:55 |
| 4 | 4 | * @LastEditors: ly525 |
| 5 | - * @LastEditTime : 2020-01-15 08:35:17 | |
| 5 | + * @LastEditTime: 2020-10-12 08:07:03 | |
| 6 | 6 | * @FilePath: /luban-h5/front-end/h5/vue.config.js |
| 7 | 7 | * @Github: https://github.com/ly525/luban-h5 |
| 8 | 8 | * @Description: Do not edit |
| 9 | 9 | * @Copyright 2018 - 2019 luban-h5. All Rights Reserved |
| 10 | 10 | */ |
| 11 | 11 | const path = require('path') |
| 12 | +const webpack = require('webpack') | |
| 12 | 13 | // const isProd = process.env.NODE_ENV === 'production' |
| 13 | 14 | const target = 'http://localhost:1337' |
| 14 | 15 | const engineOutputDir = path.join(__dirname, '../../back-end/h5-api/public/engine-assets') |
| ... | ... | @@ -40,6 +41,12 @@ const configureWebpack = { |
| 40 | 41 | alias: { |
| 41 | 42 | '@': path.join(__dirname, 'src') |
| 42 | 43 | } |
| 44 | + }, | |
| 45 | + plugins: [ | |
| 46 | + // https://github.com/moment/moment/issues/2416 | |
| 47 | + new webpack.ContextReplacementPlugin(/moment\/locale$/, /(zh-cn)$/) | |
| 48 | + ], | |
| 49 | + externals: { | |
| 43 | 50 | } |
| 44 | 51 | } |
| 45 | 52 | ... | ... |