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
a9a4412f
Commit
a9a4412f
authored
May 03, 2018
by
Evan You
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: stylePostLoader injection for windows flat node_modules
close #1284
parent
fb7d6953
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
pitcher.js
lib/loaders/pitcher.js
+3
-3
No files found.
lib/loaders/pitcher.js
View file @
a9a4412f
...
@@ -13,7 +13,7 @@ module.exports.pitch = function (remainingRequest) {
...
@@ -13,7 +13,7 @@ module.exports.pitch = function (remainingRequest) {
const
loaders
=
this
.
loaders
.
slice
(
1
)
// remove self
const
loaders
=
this
.
loaders
.
slice
(
1
)
// remove self
// do not inject if user uses null-loader to void the type (#1239)
// do not inject if user uses null-loader to void the type (#1239)
if
(
loaders
.
some
(
l
=>
/
(\/
|
\\)
null-loader/
.
test
(
l
.
path
)))
{
if
(
loaders
.
some
(
l
=>
/
(\/
|
\\
|@
)
null-loader/
.
test
(
l
.
path
)))
{
return
return
}
}
...
@@ -45,8 +45,8 @@ module.exports.pitch = function (remainingRequest) {
...
@@ -45,8 +45,8 @@ module.exports.pitch = function (remainingRequest) {
// Inject style-post-loader before css-loader for scoped CSS and trimming
// Inject style-post-loader before css-loader for scoped CSS and trimming
if
(
query
.
type
===
`style`
)
{
if
(
query
.
type
===
`style`
)
{
const
cssLoaderIndex
=
loaders
.
findIndex
(
l
=>
/
(\/
|
\\)
css-loader/
.
test
(
l
.
path
))
const
cssLoaderIndex
=
loaders
.
findIndex
(
l
=>
/
(\/
|
\\
|@
)
css-loader/
.
test
(
l
.
path
))
if
(
cssLoaderIndex
)
{
if
(
cssLoaderIndex
>
-
1
)
{
const
afterLoaders
=
loaders
.
slice
(
0
,
cssLoaderIndex
+
1
)
const
afterLoaders
=
loaders
.
slice
(
0
,
cssLoaderIndex
+
1
)
const
beforeLoaders
=
loaders
.
slice
(
cssLoaderIndex
+
1
)
const
beforeLoaders
=
loaders
.
slice
(
cssLoaderIndex
+
1
)
const
request
=
genRequest
([
const
request
=
genRequest
([
...
...
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