You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using imported types for defineProps (and other Vue macros) should work.
😯 Current Behavior
Error: [@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.
/parcel-vue/src/App.vue
2 | import type { ExternalProps } from './types';
3 |
4 | defineProps<ExternalProps>();
| ^^^^^^^^^^^^^
5 | </script>
6 |
at ScriptCompileContext.error (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:15575:11)
at importSourceToScope (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18385:16)
at resolveTypeFromImport (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18374:23)
at innerResolveTypeReference (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18261:14)
at resolveTypeReference (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:18249:20)
at innerResolveTypeElements (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17854:24)
at resolveTypeElements (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:17799:20)
at resolveRuntimePropsFromType (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19324:20)
at extractRuntimeProps (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19300:17)
at genRuntimeProps (/parcel-vue/node_modules/.pnpm/@[email protected]/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js:19288:18)
🐛 bug report
When using Vue
defineProps<Type>()
compilation fails when type is imported from a separate file.🎛 Configuration (.babelrc, package.json, cli command)
Default config
🤔 Expected Behavior
Using imported types for
defineProps
(and other Vue macros) should work.😯 Current Behavior
💁 Possible Solution
Pass
fs
configuration tocompileScript
.🔦 Context
💻 Code Sample
https://github.com/Demivan/parcel-vue
🌍 Your Environment
The text was updated successfully, but these errors were encountered: