webpack library configuration
Created by: MerrickGit
Is your proposal related to a problem?
We want to use monorepo project and create-react-app, but we cant to create library with help of react-create-app.
Describe the solution you'd like
Into .env
file we can add LIBRARY_NAME
and LIBRARY_TARGET
configuration parameters and after that these are used to webpack.config.js
Example:
// file: create-react-app/packages/react-scripts/config/webpack.config.js
//...
output: {
library: env.LIBRARY_NAME,
libraryTarget: env.LIBRARY_TARGET
//...