ant-tool / atool-build

:hammer: Build tool based on webpack.
391 stars 75 forks source link

强依赖 atool-build 的第三方工具升级问题 #292

Open soda-x opened 7 years ago

soda-x commented 7 years ago

例如外部有 : atool-doc atool-test 等

在原先设计中为了确保构建和调试代码的一致性会暴露整个构建配置同时允许其进行函数式变更。这个部分可能会涉及变更,如何进行调整?

jaredleechn commented 7 years ago

doc 对 build 的依赖主要是通过对 webpackConfig 进行额外修改完成的

{
  entry: replace,
  output.path: replace,
  resolve.root: replace,
  resolve.alias: merge,
  resolve.modulesDirectories: push,
  module.loaders: modify with replace(
    /^.*extract-text-webpack-plugin(@\d+(\.\d+)+)?\/loader.js((?!!).)*!/,
    'style!'
  ),
  module.preLoaders: push,
  plugins: push,
  externals: replace,
}

新版的 build 如果有其他的方式来方便继承原油配置并实现掉以上这些额外配置,就很好操作了