airyland / airyland/vux

[Feature Request] 使用了postcss-px2rem插件,引入popup组件,报vux_modal.css路径错误

Open
#2,774 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Vue
Stars
17.5k
Forks
3.6k
PR merge metrics
No merged PRs in 30d

Description

### Existing Component

### Component Name
Popup

### Description
解决方法:
vue-loader.config.js增加了两个配置
module.exports = {
loaders: utils.cssLoaders({
sourceMap: sourceMapEnabled,
extract: isProduction,
usePostCSS: true,//这里设置为true,否则vue引入css会报错
}),
postcss: [//postcss配置
require('postcss-px2rem')({remUnit: 37.5}),
],
cssSourceMap: sourceMapEnabled,
cacheBusting: config.dev.cacheBusting,
transformToRequire: {
video: ['src', 'poster'],
source: 'src',
img: 'src',
image: 'xlink:href'
}
}

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.