Skip to content

Vue loader bug with class field #1740

Closed
@snigle

Description

@snigle

Version

16.0.0-beta.8

Reproduction link

https://github.com/snigle/vue3Webpack

Steps to reproduce

Create webpack project from scratch with vue@next and vue-loader@next.
Make project working with simple vue component single file.
Declare a typescript class in the <script lang="ts">
Compilation will fail

What is expected?

compilation OK

What is actually happening?

ERROR in ./src/App.vue?vue&type=template&id=7ba5bd90&bindings=undefined (./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[1]!./node_modules/vue-loader/dist/index.js??ruleSet[1].rules[3].use[0]!./src/App.vue?vue&type=template&id=7ba5bd90&bindings=undefined)
Module build failed (from ./node_modules/vue-loader/dist/templateLoader.js):
SyntaxError: Unexpected token u in JSON at position 0


I put a simple application in my repo to reproduce

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions