const path = require('path');
module.exports = {
    publicPath: process.env.PUBLIC_PATH || '/',
    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
};
