Skip to content

Commit a918e00

Browse files
authored
Merge pull request #20 from lowet84/master
Fix for styling import in workspaces
2 parents a8055ef + 7b08661 commit a918e00

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,8 @@ const vuePlugin = (opts: Options = {}) => <esbuild.Plugin>{
267267
],
268268
importer: [
269269
(url: string) => {
270-
const modulePath = path.join(process.cwd(), "node_modules", url);
270+
const projectRoot = process.env.npm_config_local_prefix || process.cwd()
271+
const modulePath = path.join(projectRoot, "node_modules", url);
271272

272273
if (fs.existsSync(modulePath)) {
273274
return { file: modulePath }

0 commit comments

Comments
 (0)