File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 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'
1414
1515export default {
1616 data () {
17- return { count: 0 }
17+ return {
18+ count: 0 ,
19+ color: ' blue'
20+ }
1821 },
1922 components: {
2023 Button,
@@ -26,6 +29,6 @@ export default {
2629<style scoped>
2730.logo {
2831 width : 100px ;
29- border : 1px solid red ;
32+ border : 1px solid v-bind( color ) ;
3033}
3134 </style >
Original file line number Diff line number Diff line change @@ -90,13 +90,14 @@ export default function loader(
9090 const isServer = options . isServerBuild ?? target === 'node'
9191 const isProduction = mode === 'production'
9292
93+ const filename = resourcePath . replace ( / \? .* $ / , '' )
9394 const { descriptor, errors } = parse ( source , {
94- filename : resourcePath ,
95+ filename,
9596 sourceMap,
9697 } )
9798
9899 // cache descriptor
99- setDescriptor ( resourcePath , descriptor )
100+ setDescriptor ( filename , descriptor )
100101
101102 if ( errors . length ) {
102103 errors . forEach ( ( err ) => {
@@ -108,9 +109,9 @@ export default function loader(
108109
109110 // module id for scoped CSS & hot-reload
110111 const rawShortFilePath = path
111- . relative ( rootContext || process . cwd ( ) , resourcePath )
112+ . relative ( rootContext || process . cwd ( ) , filename )
112113 . replace ( / ^ ( \. \. [ \/ \\ ] ) + / , '' )
113- const shortFilePath = rawShortFilePath . replace ( / \\ / g, '/' ) + resourceQuery
114+ const shortFilePath = rawShortFilePath . replace ( / \\ / g, '/' )
114115 const id = hash (
115116 isProduction
116117 ? shortFilePath + '\n' + source . replace ( / \r \n / g, '\n' )
You can’t perform that action at this time.
0 commit comments