vue.config.js 699 B

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