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

能否扩展style配置,使引入的样式文件路径可自定义 #220

Closed
GeoffZhu opened this issue Mar 28, 2018 · 2 comments
Closed

Comments

@GeoffZhu
Copy link
Contributor

style的配置目前只支持truecss,分别会加载组件目录的${path}/style${path}/style/css

     // Plugin.js中第59行
      if (style === true) {
        addSideEffect(file.path, `${path}/style`);
      } else if (style === 'css') {
        addSideEffect(file.path, `${path}/style/css`);
      }

可不可以把style扩展出其他值,方便更多种类的样式目录自定义,比如这样写

      if (style === true) {
        addSideEffect(file.path, `${path}/style`);
      } else if (style === 'css') {
        addSideEffect(file.path, `${path}/style/css`);
      } else if (typeof style === 'string') {
        addSideEffect(file.path, `${path}/style/${style}`);
      }

这样写以后,可以方便的通过babelrc文件配置组件中加载样式的路径,适配更加灵活。

issue由来

在我的项目中,css分为@1x@2x@3x,想通过修改配置,方便的引入不同尺寸的css。

如果可以的的话,我就提pr了,thx。 :)

@GeoffZhu GeoffZhu changed the title 可不可以扩展style配置,使引入的样式文件路径可自定义 能否扩展style配置,使引入的样式文件路径可自定义 Mar 28, 2018
@afc163
Copy link
Contributor

afc163 commented Mar 29, 2018

+1

@GeoffZhu
Copy link
Contributor Author

GeoffZhu commented Apr 4, 2018

Hi,想要问下大大们,什么时候可以合并pr,publish到npm呢?

@GeoffZhu GeoffZhu closed this as completed Apr 8, 2018
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

2 participants