New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@ysfe/style-attach-loader

Package Overview
Dependencies
Maintainers
4
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@ysfe/style-attach-loader

wepack 样式预处理 loader.

unpublished
latest
npmnpm
Version
1.0.2
Version published
Maintainers
4
Created
Source

@ysfe/style-attach-loader

基于 style-resources-loader 改写的, 轻量级样式附加工具. 解决 vue 项目中 less 全局引入问题.

前置依赖

  • node >= 8.0.0
  • 4.x <= webpack < 5.x

开发指引

传送门

使用方式

以下结合 vue 应用场景, 整理使用文档

  • 安装: 执行 yarn add @ysfe/style-attach-loader --dev 安装插件

  • 使用:

    • wepack.config.js 中, 引用插件.
      module.exports = {
        module: {
          rules: [
            {
              test: /\.less$/i,
              loader: [
                {
                   use: "style-attach-loader",
                   options: {
                      attach: (source) => {
                         // 变更 source, 支持 异步
                        return source
                      }
                   }
                },
                "css-loader",
                "less-loader",
              ],
            },
          ],
        },
      };
    

命令行参数

[其他说明事项]

版本说明

版本说明

2021 年 06 月 10 日 - 结合 style-resources-loader 插件机制, 实现此插件.

Keywords

style attach

FAQs

Package last updated on 10 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts