vue.config.js 989 B

1234567891011121314151617181920212223242526
  1. const path = require('path');
  2. const fs = require('fs');
  3. module.exports = {
  4. publicPath: process.env.NODE_ENV === 'development' ? '/' : '/yy/',
  5. devServer: {
  6. port: 8081,
  7. disableHostCheck: true
  8. },
  9. pluginOptions: {
  10. 'style-resources-loader': {
  11. preProcessor: 'less',
  12. patterns: [path.resolve(__dirname, './src/styles/common/', process.env.ASSETS_PATH || '9th', '*.less')]
  13. }
  14. },
  15. chainWebpack: config => {
  16. config.output.filename('[name].[hash].js').end();
  17. config.resolve.alias.set('@assets', path.resolve(__dirname, 'src', 'assets', process.env.ASSETS_PATH || '9th'));
  18. config.plugin('html').tap(args => {
  19. args[0].title = process.env.TITLE;
  20. args[0].app = process.env.VUE_APP_CORDOVA === 'true';
  21. return args;
  22. });
  23. },
  24. transpileDependencies: ['element-ui', 'swiper', 'ssr-window', 'dom7', 'vue-awesome-swiper', 'vuex'],
  25. runtimeCompiler: true
  26. };