Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Webpack build fails when lang is set to "ts" in SFC #2927

Closed
FlowingPond opened this issue Jul 15, 2024 · 2 comments
Closed

[Bug]: Webpack build fails when lang is set to "ts" in SFC #2927

FlowingPond opened this issue Jul 15, 2024 · 2 comments
Labels
🐞 bug Something isn't working

Comments

@FlowingPond
Copy link

FlowingPond commented Jul 15, 2024

Version

System:
    OS: macOS 14.4.1
    CPU: (11) arm64 Apple M3 Pro
    Memory: 54.88 MB / 18.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 126.0.6478.127
    Edge: 126.0.2592.102
    Safari: 17.4.1
  npmPackages:
    @rsbuild/core: 1.0.1-beta.1 => 1.0.1-beta.1 
    @rsbuild/plugin-vue: 1.0.1-beta.1 => 1.0.1-beta.1 
    @rsbuild/webpack: 1.0.1-beta.1 => 1.0.1-beta.1

Details

I want to use TypeScript in Vue SFC with Webpack, but I get a compilation error after setting lang="ts":

File was processed with these loaders:
 * ./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/vue-loader/dist/templateLoader.js
 * ./node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/vue-loader/dist/index.js
You may need an additional loader to handle the result of these loaders.
| import { createElementVNode as _createElementVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue"
| 
> const _withScopeId = (n: any) => (_pushScopeId("data-v-7ba5bd90"),n=n(),_popScopeId(),n)
| const _hoisted_1 = { class: "content" }
| const _hoisted_2 = /*#__PURE__*/ _withScopeId(() => /*#__PURE__*/_createElementVNode("h1", null, "Rsbuild with Vue", -1 /* HOISTED */))

Reproduce link

https://github.com/FlowingPond/rsbuild-webpack-vue-ts

Reproduce Steps

pnpm i

pnpm dev

@FlowingPond FlowingPond added the 🐞 bug Something isn't working label Jul 15, 2024
@FlowingPond FlowingPond changed the title [Bug]: Webpack build fail when set lang to "ts" in vue SFC [Bug]: Webpack build fails when lang is set to "ts" in SFC Jul 15, 2024
@chenjiahan
Copy link
Member

The @rsbuild/webpack is provided for inner testing and does not supports Vue SFC.

image

https://github.com/web-infra-dev/rsbuild/tree/main/packages/compat/webpack

@FlowingPond
Copy link
Author

The @rsbuild/webpack is provided for inner testing and does not supports Vue SFC.

image

https://github.com/web-infra-dev/rsbuild/tree/main/packages/compat/webpack

Get, thanks~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants