vue.config.js 764 B

123456789101112131415161718192021222324252627282930
  1. const webpack = require('webpack')
  2. const { defineConfig } = require('@vue/cli-service')
  3. process.env.VUE_APP_VERSION = require('./package.json').version
  4. module.exports = defineConfig({
  5. transpileDependencies: true,
  6. configureWebpack: {
  7. module: {
  8. rules: [
  9. {
  10. test: /\.cur$/,
  11. use: {
  12. loader: 'file-loader'
  13. }
  14. }
  15. ]
  16. },
  17. plugins: [
  18. new webpack.ProvidePlugin({
  19. // utils: ['/src/utils.js', 'default']
  20. globalMapState: ['vuex', 'mapState'],
  21. globalMapMutations: ['vuex', 'mapMutations'],
  22. globalConfig: ['/src/config.js', 'default'],
  23. globalApi: ['/src/api.js', 'default'],
  24. globalUtils: ['/src/utils.js', 'default'],
  25. }),
  26. ],
  27. },
  28. })