Giter VIP home page Giter VIP logo

hulk-san-loader's Introduction

fork from san-webpack-loader,主要修改:增加 mdurl 支持,去掉 rootcontext 支持

san-webpack-loader

🌈 a webpack-v4 loader for San.js ☄️

文档请点这里

san-webpack-loader

Install

  npm install san-webpack-loader
  or
  yarn add san-webpack-loader

Usage

@file: webpack.config.js

// make sure the process.env.NODE_ENV is 'production' or 'development'
{
  test: /\.san$/,
  include: /src/,
  use: [
    {loader: 'babel-loader?cacheDirectory=true'},
    {
        loader: 'san-webpack-loader', options: {
            stylus: stylusOptions,
            hotReload: !isProduction,
            sourceMap: isProduction,
            minimize: isProduction
        }
    }
  ]
}

TODO

  1. webpack4 Boilerplate 多线程优化
  2. css in js 方案

CHANGELOG

1.2.6

[新特性]

  • 模板支持导出san-store的方式如: export default connect.san

1.2.5

[修复]

  • 模板attrs大小写敏感,不会按照html标准进行转换,保留原样。1.2.3引入

1.2.4

[修复]

  • stylus options未设置,导致的报错

1.2.3

[新特性]

  • 增加sass支持

[内部变更]

  • isProduction改为config

1.2.2

[新特性]

  • san-webpack-loader的options对象支持stylus属性,可以对.san文件中的stylus部分进行配置

1.2.1

[新特性]

  • 增加less支持

1.2.0

[update]

  • 内部实现由同步loader改成异步,更好的利用多线程

1.1.3

[BUG修复]

  • 修复了windows环境下样式路径失效的问题,对os做了区分处理
  • 移除cache-loader,防止内联loader处理的样式文件被缓存后,无法被MiniCssExtractPlugin输出的问题

1.1.2

[BUG修复]

  • 随官方升级babelrc的设置,推荐在业务中使用babel.config.js

1.1.1

[新特性]

  • 升级babel依赖
  • 增加cache-loader options做文件缓存 需要安装cache-loader
  • 生产环境默认关闭sourcemap

License

MIT

hulk-san-loader's People

Contributors

ksky521 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.