vue.config.js 407 B

12345678910111213141516
  1. const webpack = require('webpack')
  2. const { defineConfig } = require('@vue/cli-service')
  3. module.exports = defineConfig({
  4. transpileDependencies: true,
  5. css: {
  6. extract: false, // 将组件的 style 打包到 js 文件中
  7. },
  8. configureWebpack: {
  9. output: {
  10. libraryExport: 'default'
  11. },
  12. plugins: [
  13. new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /zh-cn$/)
  14. ]
  15. }
  16. })