Commit 0d0bf9a72153b2a2381f4dbfb64c2672e60ae44e
Committed by
GitHub
Merge branch 'master' into editor-core-package
Showing
1 changed file
with
7 additions
and
0 deletions
front-end/h5/vue.config.js
| @@ -9,6 +9,7 @@ | @@ -9,6 +9,7 @@ | ||
| 9 | * @Copyright 2018 - 2020 luban-h5. All Rights Reserved | 9 | * @Copyright 2018 - 2020 luban-h5. All Rights Reserved |
| 10 | */ | 10 | */ |
| 11 | const path = require('path') | 11 | const path = require('path') |
| 12 | +const webpack = require('webpack') | ||
| 12 | // const isProd = process.env.NODE_ENV === 'production' | 13 | // const isProd = process.env.NODE_ENV === 'production' |
| 13 | const target = 'http://localhost:1337' | 14 | const target = 'http://localhost:1337' |
| 14 | const engineOutputDir = path.join(__dirname, '../../back-end/h5-api/public/engine-assets') | 15 | const engineOutputDir = path.join(__dirname, '../../back-end/h5-api/public/engine-assets') |
| @@ -48,6 +49,12 @@ const configureWebpack = { | @@ -48,6 +49,12 @@ const configureWebpack = { | ||
| 48 | '@': path.join(__dirname, 'src'), | 49 | '@': path.join(__dirname, 'src'), |
| 49 | 'core': path.join(__dirname, 'src/components/core') | 50 | 'core': path.join(__dirname, 'src/components/core') |
| 50 | } | 51 | } |
| 52 | + }, | ||
| 53 | + plugins: [ | ||
| 54 | + // https://github.com/moment/moment/issues/2416 | ||
| 55 | + new webpack.ContextReplacementPlugin(/moment\/locale$/, /(zh-cn)$/) | ||
| 56 | + ], | ||
| 57 | + externals: { | ||
| 51 | } | 58 | } |
| 52 | } | 59 | } |
| 53 | 60 |