1 Star 0 Fork 0

韩东宇/vue-waimai

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
vue.config.js 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
const {defineConfig} = require('@vue/cli-service');
const {VantResolver} = require('unplugin-vue-components/resolvers');
const ComponentsPlugin = require('unplugin-vue-components/webpack');
module.exports = defineConfig({
transpileDependencies: true,
lintOnSave: false,
// postcss.config.js文件内容在vue.config.js内进行的配置
css: {
loaderOptions: {
postcss: {
// 可以不降版本,用 postcssOptions 套住 plugins 就行了 :{}
postcssOptions: {
plugins: [
require('postcss-pxtorem')({
// 基准值 以 iPhone6 为准, 设计稿的尺寸一般为 750px , 2 倍图
// 1rem = 16px
rootValue: 37.5,
// 所有的样式属性中只要有尺寸单位都转换, style样式中的尺寸不会转换
// 建议如果你用了 postcss-pxtorem 插件后, 最好就不要用style来写样式
propList: ['*'],
// selectorBlackList: ["van"],
}),
],
},
},
},
},
configureWebpack: {
plugins: [
ComponentsPlugin.default({
resolvers: [VantResolver()],
}),
],
},
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/dong-yu-han/vue-waimai.git
git@gitee.com:dong-yu-han/vue-waimai.git
dong-yu-han
vue-waimai
vue-waimai
master

搜索帮助