初始化仓库
This commit is contained in:
43
vue.config.js
Normal file
43
vue.config.js
Normal file
@ -0,0 +1,43 @@
|
||||
const { defineConfig } = require("@vue/cli-service");
|
||||
const postcssPxToViewport = require("postcss-px-to-viewport");
|
||||
|
||||
module.exports = defineConfig({
|
||||
publicPath: "./",
|
||||
transpileDependencies: false,
|
||||
lintOnSave: false,
|
||||
devServer: {
|
||||
client: {
|
||||
overlay: false,
|
||||
},
|
||||
},
|
||||
configureWebpack: (config) => {
|
||||
//调试JS
|
||||
config.devtool = "source-map";
|
||||
},
|
||||
css: {
|
||||
loaderOptions: {
|
||||
postcss: {
|
||||
postcssOptions: {
|
||||
// 增加这一层 postcssOptions
|
||||
plugins: [
|
||||
postcssPxToViewport({
|
||||
unitToConvert: "px",
|
||||
viewportWidth: 1920,
|
||||
unitPrecision: 6,
|
||||
viewportUnit: "vw",
|
||||
fontViewportUnit: "vw",
|
||||
propList: ["*"],
|
||||
selectorBlackList: ["ignore-"],
|
||||
minPixelValue: 1,
|
||||
mediaQuery: false,
|
||||
replace: true,
|
||||
exclude: /(\/|\\)(node_modules)(\/|\\)/,
|
||||
include: [],
|
||||
landscape: false,
|
||||
}),
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user