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
0c2da0f5
Commit
0c2da0f5
authored
Aug 16, 2018
by
Jianrong Yu
Committed by
Evan You
Aug 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: append the file extension to the mapping files in devtools (#1372)
close #1371
parent
cd17d05e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
select.js
lib/select.js
+3
-0
style.spec.js
test/style.spec.js
+1
-1
No files found.
lib/select.js
View file @
0c2da0f5
module
.
exports
=
function
selectBlock
(
descriptor
,
loaderContext
,
query
)
{
// template
if
(
query
.
type
===
`template`
)
{
loaderContext
.
resourcePath
+=
'.'
+
(
descriptor
.
template
.
lang
||
'html'
)
loaderContext
.
callback
(
null
,
descriptor
.
template
.
content
,
...
...
@@ -11,6 +12,7 @@ module.exports = function selectBlock (descriptor, loaderContext, query) {
// script
if
(
query
.
type
===
`script`
)
{
loaderContext
.
resourcePath
+=
'.'
+
(
descriptor
.
script
.
lang
||
'js'
)
loaderContext
.
callback
(
null
,
descriptor
.
script
.
content
,
...
...
@@ -22,6 +24,7 @@ module.exports = function selectBlock (descriptor, loaderContext, query) {
// styles
if
(
query
.
type
===
`style`
&&
query
.
index
!=
null
)
{
const
style
=
descriptor
.
styles
[
query
.
index
]
loaderContext
.
resourcePath
+=
'.'
+
(
style
.
lang
||
'css'
)
loaderContext
.
callback
(
null
,
style
.
content
,
...
...
test/style.spec.js
View file @
0c2da0f5
...
...
@@ -179,6 +179,6 @@ test('CSS Modules', async () => {
// custom ident
await
testWithIdent
(
'[path][name]---[local]---[hash:base64:5]'
,
/css-modules---red---
\w{5}
/
/css-modules-
vue-
--red---
\w{5}
/
)
})
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