pipe01 / esbuild-plugin-vue3

esbuild plugin for loading Vue 3 SFC files
MIT License
59 stars 13 forks source link

Fix for styling import in workspaces #20

Closed lowet84 closed 11 months ago

lowet84 commented 1 year ago

There is currently an issue where the resolved path is not correct if the project is part of a workspace. If the main project has a path: ".../my-project/" sub-project has a path: ".../my-project/packages/sub-project/"

then the node_modules will be located at ".../my-project/node_modules" the resolved modulePath will be ".../my-project/packages/sub-project/node_modules". The latter path does not exist when working inside a project with workspaces. The env variable "process.env.npm_config_local_prefix" provides a path to the project root dir.

pipe01 commented 11 months ago

Thanks!