vue.config.js 745 B

1234567891011121314151617181920212223242526272829303132333435
  1. const webpack = require('webpack')
  2. const { defineConfig } = require('@vue/cli-service')
  3. let publicPath = ''
  4. switch (process.env.NODE_ENV) {
  5. case 'development':
  6. publicPath = '/'
  7. break
  8. case 'production':
  9. publicPath = '/one_day_in_southern_song_dynasty/'
  10. break
  11. default:
  12. publicPath = '/'
  13. break
  14. }
  15. module.exports = defineConfig({
  16. publicPath,
  17. // transpileDependencies: true,
  18. configureWebpack: {
  19. module: {
  20. rules: [
  21. ],
  22. },
  23. plugins: [
  24. new webpack.ProvidePlugin({
  25. utils: ['/src/utils.js', 'default'],
  26. store: ['/src/store/index.js', 'default'],
  27. api: ['/src/api.js', 'default'],
  28. config: '/src/config.js',
  29. // mapGetters: ['vuex', 'mapGetters'],
  30. }),
  31. ],
  32. },
  33. })