-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat: ice-scripts add config override power #38
Conversation
output: Object.assign({ | ||
path: paths.appBuild, | ||
filename: '[name].js', | ||
publicPath: '/dist/', | ||
}), | ||
publicPath: buildConfig.publicPath || '/dist/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
publicPath 收敛到 output 里就可以了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
如果覆盖了 publicPath 在 dev 模式下就运行不起来了, 只有在发布的时候才需要
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要回归下 dev-server 是否会覆盖这个值
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output 修改下
done |
regenerator: true, | ||
moduleName: 'babel-runtime', | ||
}], | ||
[babelPluginIce, { libraryName: '@ali/ice' }], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
babelPluginIce 这个插件看下是否可以通用, 同时 @ali
这些可以删除掉了.
publicPath: '/dist/', | ||
}), | ||
publicPath: paths.servedPath, | ||
}, buildConfig.output || {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
output 的优先级是最高的, 环境变量暂不提供, 容易混淆.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
插件与 buildConfig 需要修改
fix: remove export name before add
fix: remove export name before add
增加 buildConfig 中定义字段覆盖编译配置的能力
目前支持的:
其他特性修改:
支持 环境变量 PUBLIC_URL, 用来指定 output.publicPath, 逻辑同 create-react-app
add babel-plugin-transfrom-runtime to support regenerator-runtime(MIT)
我会在站点上补充一篇工程自定义的文档