const path = require('path');
module.exports = {
    publicPath: process.env.NODE_ENV === 'production' ? '/9th/' : '/',
    devServer: {
        port: 8081,
        disableHostCheck: true
    },
    pluginOptions: {
        'style-resources-loader': {
            preProcessor: 'less',
            patterns: [path.resolve(__dirname, './src/styles/common/*.less')]
        }
    },
    chainWebpack: config => {
        if (process.env.NODE_ENV === 'development') {
            config.output.filename('[name].[hash].js').end();
        }
    },
    transpileDependencies: ['element-ui', 'swiper', 'ssr-window', 'dom7', 'vue-awesome-swiper', 'vuex'],
    runtimeCompiler: true
};
