Skip to content

Commit

Permalink
chore: add fixme comments to address issues with specific project names
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Nov 30, 2020
1 parent e750609 commit 99a5196
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/pluginWebpack4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class VueLoaderPlugin implements webpack.Plugin {
const vueUse = vueRule.use as webpack.RuleSetLoader[]
// get vue-loader options
const vueLoaderUseIndex = vueUse.findIndex((u) => {
// FIXME: this code logic is incorrect when project paths starts with `vue-loader-something`
return /^vue-loader|(\/|\\|@)vue-loader/.test(u.loader || '')
})

Expand Down
1 change: 1 addition & 0 deletions src/pluginWebpack5.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ class VueLoaderPlugin implements Plugin {

// get vue-loader options
const vueLoaderUseIndex = vueUse.findIndex((u) => {
// FIXME: this code logic is incorrect when project paths starts with `vue-loader-something`
return /^vue-loader|(\/|\\|@)vue-loader/.test(u.loader)
})

Expand Down

0 comments on commit 99a5196

Please sign in to comment.