-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Description
Version
3.0.0-beta.15
Reproduction link
https://github.com/zhangbobell/vue-cli-lerna-reproduce
Steps to reproduce
git clone https://github.com/zhangbobell/vue-cli-lerna-reproduce.git
cd vue-cli-lerna-reproduce
yarn
cd packages/sample && yarn serve
What is expected?
runs well
What is actually happening?
broken since postcss error
Module build failed: Error: No PostCSS Config found in: /Users/myName/Sites/demos/temp/vue-cli-lerna-reproduce/node_modules/el
ement-ui/lib/theme-chalk
About my repos
- I use
lerna
to manage monorepo include a repo create byvue-cli
- I use a ui library
element-ui
, import it js and css - seems the imported css will be handled by postCSS, which will find it's config file recursively in it's parent directory until user's home directory
postcss-loader
has expose a options calledpath
to specify the path of config file, butvue-cli-service
only pass insourceMap
option
Tried solution
- I've tried use
vue.config.js
to override the config but failed, since it's not allowed, main because it's a internal config postcss-load-config
does not provide path options, cannot use the solution posted in the docs- following #1124 may solve this problem (the code snippet did not work since the config differs), but I did not try it, since the level of postcss config section is too deep, the callback will be a nightmare, may be encapsulate a vue-cli-plugin ?
- put a
.postcssrc.js
in lerna root dir or addpostcss
section to root package.json will solve this, but I think it's not a elegant solution
So, would you please provide a elegant solution about this problem ?
Thanks very much !
maximelebreton, suenot, Morb0, elibolonur, TAnas0 and 1 more
Metadata
Metadata
Assignees
Labels
No labels