File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,10 @@ import ScriptSetup from './ScriptSetup.vue'
14
14
15
15
export default {
16
16
data () {
17
- return { count: 0 }
17
+ return {
18
+ count: 0 ,
19
+ color: ' blue'
20
+ }
18
21
},
19
22
components: {
20
23
Button,
@@ -26,6 +29,6 @@ export default {
26
29
<style scoped>
27
30
.logo {
28
31
width : 100px ;
29
- border : 1px solid red ;
32
+ border : 1px solid v-bind( color ) ;
30
33
}
31
34
</style >
Original file line number Diff line number Diff line change @@ -90,13 +90,14 @@ export default function loader(
90
90
const isServer = options . isServerBuild ?? target === 'node'
91
91
const isProduction = mode === 'production'
92
92
93
+ const filename = resourcePath . replace ( / \? .* $ / , '' )
93
94
const { descriptor, errors } = parse ( source , {
94
- filename : resourcePath ,
95
+ filename,
95
96
sourceMap,
96
97
} )
97
98
98
99
// cache descriptor
99
- setDescriptor ( resourcePath , descriptor )
100
+ setDescriptor ( filename , descriptor )
100
101
101
102
if ( errors . length ) {
102
103
errors . forEach ( ( err ) => {
@@ -108,9 +109,9 @@ export default function loader(
108
109
109
110
// module id for scoped CSS & hot-reload
110
111
const rawShortFilePath = path
111
- . relative ( rootContext || process . cwd ( ) , resourcePath )
112
+ . relative ( rootContext || process . cwd ( ) , filename )
112
113
. replace ( / ^ ( \. \. [ \/ \\ ] ) + / , '' )
113
- const shortFilePath = rawShortFilePath . replace ( / \\ / g, '/' ) + resourceQuery
114
+ const shortFilePath = rawShortFilePath . replace ( / \\ / g, '/' )
114
115
const id = hash (
115
116
isProduction
116
117
? shortFilePath + '\n' + source . replace ( / \r \n / g, '\n' )
You can’t perform that action at this time.
0 commit comments