Skip to content

样式关键词编译 ​

TypeScript strict

scss 链接的关键词编译,替换关键词 @TIP_MODULE_STYLE_NAME。已不建议使用。

1. 作者 ​

novlan1

2. 如何使用 ​

安装

bash
pnpm add @plugin-light/webpack-loader-cross-module-style -D

在 vue.config.js 中添加如下设置:

js
const { LOADER: crossModuleStyle } = require('@plugin-light/webpack-loader-cross-module-style');

module.export = {
  chainWebpack(config) {
    config.module
      .rule('vue')
      .test(/\.vue$/)
      .use(crossModuleStyle) 
      .loader(crossModuleStyle)
      .options({
        target: 'gp',
      })
      .end();
  }
}

3. 参数 ​

ts
export type ICrossModuleStyleOptions = {
  target?: string;
};

4. 更新日志 ​

点此查看