智能照明系统APP-本地串口
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
LightingSystemApp-serial/.svn/pristine/7d/7d0e92930b102d95d03b054a55f...

18 lines
604 B

3 years ago
const path = require('path')
const isWin = /^win/.test(process.platform)
const normalizePath = path => (isWin ? path.replace(/\\/g, '/') : path)
module.exports = function (content, map) {
this.cacheable && this.cacheable()
const resourcePath = normalizePath(this.resourcePath)
if (
resourcePath !== normalizePath(path.resolve(process.env.UNI_INPUT_DIR, 'App.vue')) &&
content.indexOf('platform="mp-weixin"') === -1 // 小程序组件暂不加scoped
) {
return this.callback(null, content.replace(/(<style\b[^><]*)>/ig, '$1 scoped>'), map)
}
this.callback(null, content, map)
}