Skip to content

Commit

Permalink
fix(loader): support Windows path separator
Browse files Browse the repository at this point in the history
  • Loading branch information
freddy38510 committed Sep 3, 2023
1 parent f006da8 commit ac02f49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/pluginWebpack4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class VueLoaderPlugin {
// get vue-loader options
const vueLoaderUseIndex = vueUse.findIndex((u) => {
// FIXME: this code logic is incorrect when project paths starts with `vue-loader-something`
return /^@freddy38510\/vue-loader|(\/|\\|@)@freddy38510\/vue-loader/.test(
return /^@freddy38510(\/|\\)vue-loader|(\/|\\|@)@freddy38510(\/|\\)vue-loader/.test(
u.loader || ''
)
})
Expand Down
2 changes: 1 addition & 1 deletion src/pluginWebpack5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class VueLoaderPlugin {
// get vue-loader options
const vueLoaderUseIndex = vueUse.findIndex((u) => {
// FIXME: this code logic is incorrect when project paths starts with `vue-loader-something`
return /^@freddy38510\/vue-loader|(\/|\\|@)@freddy38510\/vue-loader/.test(
return /^@freddy38510(\/|\\)vue-loader|(\/|\\|@)@freddy38510(\/|\\)vue-loader/.test(
u.loader
)
})
Expand Down

0 comments on commit ac02f49

Please sign in to comment.