Closed danielmlc closed 1 year ago
{ test: /\.vue$/, use: 'vue-loader', }, { test: /\.(jsx?|js|ts|tsx)$/, exclude: /(node_modules)/, use: { // `.swcrc` can be used to configure swc loader: "swc-loader" } }
ERROR in ./src/App.vue?vue&type=template&id=7ba5bd90&ts=true (./node_modules/swc-loader/src/index.js!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[6].use[0]!./src/App.vue?vue&type=template&id=7ba5bd90&ts=true) Module build failed (from ./node_modules/swc-loader/src/index.js): Error: × Expected ',', got ':' ╭─[E:\project\webpack\swc-test\src\App.vue:6:1] 6 │ _hoisted_2 7 │ ] 8 │ 9 │ export function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) { · ─ 10 │ return (_openBlock(), _createElementBlock("div", _hoisted_1, _hoisted_3)) 11 │ } ╰────
demo: https://github.com/danielmlc/swc-test
Please report to https://github.com/swc-project/swc/issues instead
ERROR in ./src/App.vue?vue&type=template&id=7ba5bd90&ts=true (./node_modules/swc-loader/src/index.js!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[6].use[0]!./src/App.vue?vue&type=template&id=7ba5bd90&ts=true) Module build failed (from ./node_modules/swc-loader/src/index.js): Error: × Expected ',', got ':' ╭─[E:\project\webpack\swc-test\src\App.vue:6:1] 6 │ _hoisted_2 7 │ ] 8 │ 9 │ export function render(_ctx: any,_cache: any,$props: any,$setup: any,$data: any,$options: any) { · ─ 10 │ return (_openBlock(), _createElementBlock("div", _hoisted_1, _hoisted_3)) 11 │ } ╰────
demo: https://github.com/danielmlc/swc-test