Skip to content

Commit 60eb82d

Browse files
authored
feat: vuejs#1371 Append the file extension to the mapping files in devtools
1 parent a6028e6 commit 60eb82d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: lib/select.js

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module.exports = function selectBlock (descriptor, loaderContext, query) {
22
// template
33
if (query.type === `template`) {
4+
loaderContext.resourcePath += '.' + (descriptor.template.type || 'template')
45
loaderContext.callback(
56
null,
67
descriptor.template.content,
@@ -11,6 +12,7 @@ module.exports = function selectBlock (descriptor, loaderContext, query) {
1112

1213
// script
1314
if (query.type === `script`) {
15+
loaderContext.resourcePath += '.' + (descriptor.script.lang || 'js')
1416
loaderContext.callback(
1517
null,
1618
descriptor.script.content,
@@ -22,6 +24,7 @@ module.exports = function selectBlock (descriptor, loaderContext, query) {
2224
// styles
2325
if (query.type === `style` && query.index != null) {
2426
const style = descriptor.styles[query.index]
27+
loaderContext.resourcePath += '.' + (style.lang || 'css')
2528
loaderContext.callback(
2629
null,
2730
style.content,

0 commit comments

Comments
 (0)