"devDependencies": { "@types/react": "16.9.51", "@types/react-dom": "16.9.8", "@types/lodash-es": "^4.17.21"
"dependencies": { "lodash-es": "^4.17.21", "react": "16.13.1", "react-dom": "16.13.1"
change mode to production when pushing final version to minimize library and create single js or CDN
module.exports = { mode: 'development', // switch to production when you package for production - impacts final size of package you import
For this library, things to NOT bundle here: externals: { // Read webpack documentation - do not want to bundle these into the package "react": "React", "lodash-es": "lodash-es/*" },
Refer to it with the file:.. reference. When the library works, then the consumer should pull from the npm library
"dependencies": { // Use file reference for local copies // // "@mikezimm/sample-library": "^1.0.0", "@mikezimm/sample-library": "file:../trainingSample",