const path = require('path');
const conf = require('./config/pages');

function resolve(dir) {
	return path.join(__dirname, dir)
}

const Timestamp = new Date().getTime();
module.exports = {
	pages: conf.pages,
	publicPath: './',
	outputDir: conf.outputDir + '_'+Timestamp,
	assetsDir: 'static',
	lintOnSave: false,
	lintOnSave: false,
	devServer: conf.devServer,
	//不输出map
	productionSourceMap: false,
	chainWebpack: conf.chainWebpack,
	configureWebpack: conf.configureWebpack,
	css: {
		extract: {
			filename: `./static/css/[name].${Timestamp}.css`,
			chunkFilename: `./static/css/[name].${Timestamp}.css`
		},
		sourceMap: false,
		loaderOptions: {
			// 给 sass-loader 传递选项
			sass: {
				// @/ 是 src/ 的别名
				// prependData: `@import "@/assets/scss/base.scss";`
			}
		}
	}
};
