@plugin-light/webpack-loader-cross-game-style
v1.0.2
Published
<p align="center"> <img src="https://img.shields.io/npm/dw/@plugin-light/webpack-loader-cross-game-style"> <img src="https://img.shields.io/npm/unpacked-size/@plugin-light/webpack-loader-cross-game-style"> <img src="https://img.shields.io/npm/v/@plu
Downloads
699
Readme
样式关键词编译
scss链接的关键词编译,替换关键词@TIP_STYLE_NAME。
1. 作者
novlan1
2. 如何使用
安装
pnpm add @plugin-light/webpack-loader-cross-game-style -D在 vue.config.js 中添加如下设置:
const { LOADER: crossGameStyle } = require('@plugin-light/webpack-loader-cross-game-style');
module.export = {
chainWebpack(config) {
config.module
.rule('vue')
.test(/\.vue$/)
.use(crossGameStyle)
// 处理样式的loader,必须在vue-loader前执行
.loader(crossGameStyle)
.end();
}
}3. 参数
export type ICrossGameStyleOptions = {
/**
* 要替换的样式文件名,不含后缀,默认空,即从项目的 config.js 中获取
*/
styleName?: string | Array<string>;
/**
* 处理的平台,默认全部,即 ['ALL']
*/
platforms?: Array<string>;
/**
* 要查找的文件后缀,默认 ['scss', 'less']
*/
extList?: Array<string>;
};