import { defineConfig } from 'vite';
import uni from '@dcloudio/vite-plugin-uni';
import postcssCfg from './postcss.config.js'
import VueSetupExtend from 'vite-plugin-vue-setup-extend';
import h5ProdEffectPlugin from 'uni-vite-plugin-h5-prod-effect';
// import commonjs from 'vite-plugin-commonjs'
// import vitePluginRequire from "vite-plugin-require";

export default defineConfig({
	plugins: [ uni(), VueSetupExtend(), h5ProdEffectPlugin()],
	css: {
		preprocessorOptions: {
			scss: {
				additionalData: `@import "@/assets/styles/common.scss";`
			}
		}
	},
	// postcss: postcssCfg
});