0.0.1 • Published 5 years ago

style-config-loader v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

style-config-loader

小工具,用于在stylus、less、sass等css预处理语言前插入公共的代码,以减少代码中不断import某个文件

install

  npm install style-config-loader --save-dev

example

webpack.config.js

const path = require('path')

module.exports = {
  ...,
  module: {
    rules: [
      {
        test: /\.styl$/,
        use: [
          'css-loader',
          'stylus-loader',
          {
            loader: 'style-config-loader',
            options: {
              configPath: path.resolve('./src/style/config.styl')
            }
          }
        ]
      }
    ]
  }
}