[@vue/compiler-sfc] compileScript now requires passing the `id` option.

See original GitHub issue

Version

3.0.4

Reproduction link

https://github.com/mazaiting

Steps to reproduce

version: “vue”: “^3.0.4”, “@vue/compiler-sfc”: “^3.0.4”

problem:

\ 正在编译...[@vue/compiler-sfc] compileScript now requires passing the `id` option.
Upgrade your vite or vue-loader version for compatibility with the latest experimental proposals.

- 正在编译...[@vue/compiler-sfc] compileTemplate now requires the `id` option.`.

how to solve this problem?

What is expected?

What is actually happening?

no this tips.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
posvacommented, Dec 20, 2020

Read and follow https://new-issue.vuejs.org/?repo=vuejs/vue#why-repro The error might be a miss configuration on a template. In that case open the issue on the template repo

1reaction
gkwebcommented, Dec 20, 2020

@mazaiting - I’ve resolved this issue by setting the NODE_ENV.

NODE_ENV=production npx rollup -c - For example removes this error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue warning: compileTemplate now requires the `id` option.
[@vue/compiler-sfc] compileTemplate now requires the `id` option.`. ... I would say this should instead use id and not compilerOptions.
Read more >
Error : vue-loader requires @vue/compiler-sfc to be present in ...
My issue is that it's not mentioned in the vue-loader docs that this is necessary. The error is easy to miss, especially since...
Read more >
@vue/compiler-sfc - npm
Start using @vue/compiler-sfc in your project by running `npm i @vue/compiler-sfc`. There are 849 other projects in the npm registry using ...
Read more >
vue/compiler-sfc@3.2.45 - jsDocs.io
Documentation for npm package @vue/compiler-sfc@3.2.45 - jsDocs.io. ... Compile <script setup> It requires the whole SFC descriptor because ...
Read more >
@vue/compiler-sfc | Yarn - Package Manager
Options needed for these APIs can be passed via the query string. For detailed API references and options, check out the source type...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found