| 1234567891011121314151617181920212223242526272829303132333435363738 |
- const path = require('path');
- const fs = require('fs');
- let publicPath;
- switch (process.env.NODE_ENV) {
- case 'development':
- publicPath = '/';
- break;
- case 'production':
- publicPath = '/9th/';
- break;
- case 'test':
- publicPath = '/9th/';
- break;
- }
- module.exports = {
- publicPath: publicPath,
- devServer: {
- port: 8081,
- disableHostCheck: true
- },
- pluginOptions: {
- 'style-resources-loader': {
- preProcessor: 'less',
- patterns: [path.resolve(__dirname, './src/styles/common/', process.env.ASSETS_PATH || '9th', '*.less')]
- }
- },
- chainWebpack: config => {
- config.output.filename('[name].[hash].js').end();
- config.resolve.alias.set('@assets', path.resolve(__dirname, 'src', 'assets', process.env.ASSETS_PATH || '9th'));
- config.plugin('html').tap(args => {
- args[0].title = process.env.TITLE;
- args[0].app = process.env.VUE_APP_CORDOVA === 'true';
- return args;
- });
- },
- transpileDependencies: ['element-ui', 'swiper', 'ssr-window', 'dom7', 'vue-awesome-swiper', 'vuex'],
- runtimeCompiler: true
- };
|