Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] 添加stylus支持 #2910

Closed
fengxinming opened this issue Nov 11, 2019 · 1 comment
Closed

[RFC] 添加stylus支持 #2910

fengxinming opened this issue Nov 11, 2019 · 1 comment
Assignees

Comments

@fengxinming
Copy link
Contributor

fengxinming commented Nov 11, 2019

PR链接 https://github.com/ice-lab/ice-scripts/pull/71

自定义扩展

module.exports = {
  chainWebpack(config) {
    [
      config.module.rule('styl'),
      config.module.rule('styl-module'),
    ].forEach(rule => {
      rule.use('stylus-loader').options({
        preferPathResolver: 'webpack',
        import: [], // 导入全局函数
        use: [], // 添加插件
        define: { // 全局变量
            isProd: process.env.NODE_ENV === 'production',
            urlPrefix: '//g.alicdn.com'
        }
      });
    });
    return config;
  }
};
@imsobear
Copy link
Collaborator

imsobear commented Dec 3, 2019

2.1.13 已支持

@imsobear imsobear closed this as completed Dec 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants