I built 3 webpack projects with the following dependency:
- Master Project.
- Common Lib.
- Security Lib.
Common and Security packages are defined as webpack library and inserted as dependencies on master's package.json. I need to setup my dependent projects to take the global values I set at master's webpack config with DefinePlugin which I configure depending on the environment through an npm script.
plugins.push(new webpack.DefinePlugin({
requireSsl:true,
api_url:"https://some.url"
}))
So, anytime I build my master project all my dependencies have those constants aligned.
via Anyul Rivas
No comments:
Post a Comment