Skip to content

Commit

Permalink
fix(ast-vue): Handle js script deps via esbuild-plugin-ast
Browse files Browse the repository at this point in the history
  • Loading branch information
lgollut committed Jan 30, 2024
1 parent af9b9ac commit 3a7f015
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/esbuild-plugin-ast-vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"hash-sum": "^2.0.0"
},
"peerDependencies": {
"@liip/esbuild-plugin-ast": "0.3.x",
"esbuild": "0.19.x"
}
}
1 change: 1 addition & 0 deletions packages/esbuild-plugin-ast-vue/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export function astParserVue({
build.onResolve({ filter: /\.vue\?type=script/ }, (args) => {
return {
path: args.path,
namespace: 'ast-parser',
};
});

Expand Down
2 changes: 1 addition & 1 deletion packages/esbuild-plugin-ast/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export function astParser({

/**
* Load, parse and modify any other imports that was placed in
* the `phx-class-prefixer` namespace
* the `ast-parser` namespace
*/
build.onLoad({ filter: /.*/, namespace }, async (args) => {
const source = await readFile(args.path, 'utf-8');
Expand Down

0 comments on commit 3a7f015

Please # to comment.