2

I have 3 projects, one core and other 2 plugins which need to be imported in the core one.

Let's say Core is A, and plugins are P1 and P2.

I have a post-install in P1 and P2 that build the project using webpack and compile all the code inside A/node_modules/p1/dist/index.min.js

P1 and P2 are using different Webpack plugins and del-cli to delete all things inside. but when I do npm install inside A, it gives the error that dell command not found or some webpack preset not found. I understand the issue is with environment variables, but there should be a way to configure the project in such a way it finds recursive things inside it.

Or I need a suggestion how I should manage the builds of my Projects P1 and P2

Exact problem is, they are react projects. P1 and P2 are component liberaries, while A is the main project, and I need to use components from component liberary (P1, P2) inside A.

for that I need to include them inside my package.json, and I need a built/compiled version of it. (JSX to JS converted)

but because I've given link of dev branch of my both repos, P1 and P2, which are constantly upgraded by different developers, and they can't build and push it with each change in the prject, so I tried post install and tried building it in post-install. but That way Main project always fails to install it because it cant find webpack presets as both project have different kind of conf.

Usman Tahir
  • 2,513
  • 4
  • 24
  • 38

0 Answers0