12345678910111213141516171819202122232425262728293031323334353637 |
- import { defineConfig, loadConfigFromFile, loadEnv } from "vite";
- import Components from "unplugin-vue-components/vite";
- var pxtoviewport = require("postcss-px-to-viewport");
- const config = defineConfig(({ command, mode, ssrBuild }) => {
- return {
- plugins: [
- Components({
- dirs: [
- "src/h5/components",
- "src/common/components",
- "src/h5/pages/**/_components",
- ],
- resolvers: [],
- dts: "src/h5/components.d.ts",
- }),
- ],
- server: {
- port: 3333,
- },
- css: {
- postcss: {
- plugins: [
- pxtoviewport({
- viewportWidth: 375,
- propList: ["*"],
- include: /\/node_modules\/vant/,
- }),
- ],
- },
- },
- };
- });
- export default config;
|