Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vue-loader
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pi-plusplus
fork-from-github
vue-loader
Commits
e7b2b118
Unverified
Commit
e7b2b118
authored
Jun 23, 2020
by
Haoqun Jiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: skip matching rule with 'enforce'
backports #1680
parent
e081dc4a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
plugin-webpack5.js
lib/plugin-webpack5.js
+4
-0
advanced.spec.js
test/advanced.spec.js
+14
-0
No files found.
lib/plugin-webpack5.js
View file @
e7b2b118
...
...
@@ -38,6 +38,10 @@ class VueLoaderPlugin {
let
vueRules
=
[]
for
(
const
rawRule
of
rules
)
{
// skip rules with 'enforce'. eg. rule for eslint-loader
if
(
rawRule
.
enforce
)
{
continue
}
// skip the `include` check when locating the vue rule
const
clonedRawRule
=
Object
.
assign
({},
rawRule
)
delete
clonedRawRule
.
include
...
...
test/advanced.spec.js
View file @
e7b2b118
...
...
@@ -241,6 +241,20 @@ test('support rules with oneOf', async () => {
})
})
test
(
'should work with eslint loader'
,
async
()
=>
{
// TODO:
return
new
Promise
(
resolve
=>
{
bundle
({
entry
:
'basic.vue'
,
modify
:
config
=>
{
config
.
module
.
rules
.
unshift
({
test
:
/
\.
vue$/
,
loader
:
'vue-loader'
,
enforce
:
'pre'
})
}
},
()
=>
resolve
())
})
})
// TODO
// test('multiple rule definitions', done => {
// mockBundleAndRun({
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment