Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
316 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 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...