We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1f3db8 commit 9ec6b7fCopy full SHA for 9ec6b7f
packages/taro-vite-runner/src/harmony/style.ts
@@ -143,8 +143,10 @@ export async function stylePlugin(viteCompilerContext: ViteHarmonyCompilerContex
143
load (id) {
144
if (isStyleRequest(id)) {
145
const rawId = stripVirtualModulePrefix(id).replace(STYLE_SUFFIX_RE, '')
146
- this.addWatchFile(rawId)
147
- return fs.readFileSync(rawId, 'utf-8')
+ if (fs.existsSync(rawId)) {
+ this.addWatchFile(rawId)
148
+ return fs.readFileSync(rawId, 'utf-8')
149
+ }
150
}
151
},
152
async transform(raw, id) {
0 commit comments