Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
319 views
in Technique[技术] by (71.8m points)

javascript - Lerna: How to add packages with their own webpack config

I would like to use lerna to manage multiple components and share a single config, but also have a few standalone apps using CRA or Next.js that use their own configuration.

How do you pull off a setup like that in lerna?

The command that seems most relevant is lerna exec as that is what I see in the build scripts. However it gives no option to skip a package or offer an alternative build command.

https://github.com/lerna/lerna/tree/main/commands/exec#readme

My build script looks like this:

"build": "lerna exec --parallel -- babel --root-mode upward src -d lib --ignore **/*.stories.js,**/*.spec.js,*-app; ",

I can ignore packages ending in -app, but I would like to execute their own build scripts instead of the base one.

question from:https://stackoverflow.com/questions/65877098/lerna-how-to-add-packages-with-their-own-webpack-config

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...