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

支持在入口自定义webpack的entry配置 #56

Closed
otakustay opened this issue Jun 4, 2021 · 0 comments
Closed

支持在入口自定义webpack的entry配置 #56

otakustay opened this issue Jun 4, 2021 · 0 comments

Comments

@otakustay
Copy link
Member

当前reSKRipt的策略是,每一个入口可以配一个xxx.config.js文件,但里面只能导出html-webpack-plugin的配置

有一种场景是,不同的入口需要有不同的产出格式,比如有些入口不要产生hash,有些则要构建成CJS等

为此,我们要扩展一下xxx.config.js的职能,保留现在兼容性的基础上,增加以下逻辑:

  1. 如果导出包含了entryhtml这2个属性,则认为是新的对象结构
  2. 在新的对象结构中,html-webpack-plugin的配置要求放在exports.html
  3. 可以使用exports.entry配置webpack entry

后续在2.0版本中,可以把旧格式的支持删除

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

1 participant