vuejs / vue-loader

📦 Webpack loader for Vue.js components
MIT License
4.99k stars 915 forks source link

Vue 3.3. Provide fs option for @vue/compiler-sfc 3.3.0+ compileScript function #2041

Open tragid opened 1 year ago

tragid commented 1 year ago

Loading vue 3.3.0 with webpack5, vue-loader (v17.1.1) and swc-loader throws exception:

ERROR in ./src/modules/sportline/submodules/event-details/components/info-headline/OutrightInfoMobile.vue?vue&type=template&id=d157489a&scoped=true&ts=true (../leon-core/webpack-bundle-translations-plugin/src/BundleTranslationsLoader.ts!../leon-core/webpack-loader-replace-vue-template/index.js??ruleSet[1].rules[16].use[1]!../.yarn/__virtual__/swc-loader-virtual-030f769ae4/0/cache/swc-loader-npm-0.2.3-349484c9ea-010d84d399.zip/node_modules/swc-loader/src/index.js??clonedRuleSet-12.use[1]!../.yarn/__virtual__/swc-loader-virtual-030f769ae4/0/cache/swc-loader-npm-0.2.3-349484c9ea-010d84d399.zip/node_modules/swc-loader/src/index.js??clonedRuleSet-12.use[2]!../.yarn/__virtual__/vue-loader-virtual-e77cc748aa/0/cache/vue-loader-npm-17.1.1-9fe56345a4-02b28078a6.zip/node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[3]!../.yarn/__virtual__/vue-loader-virtual-e77cc748aa/0/cache/vue-loader-npm-17.1.1-9fe56345a4-02b28078a6.zip/node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./src/modules/sportline/submodules/event-details/components/info-headline/OutrightInfoMobile.vue?vue&type=template&id=d157489a&scoped=true&ts=true)
Module Error (from ../.yarn/__virtual__/vue-loader-virtual-e77cc748aa/0/cache/vue-loader-npm-17.1.1-9fe56345a4-02b28078a6.zip/node_modules/vue-loader/dist/templateLoader.js):
[@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.
Threebow commented 10 months ago

Having same issue