nuxt / vite

⚡ Vite Experience with Nuxt 2

Home Page:https://vite.nuxtjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Vite doesn't appear to know how to handle @nuxtjs/router-extras <router> blocks

nathanchase opened this issue · comments

Versions

nuxt-vite: 0.2.4
nuxt: 2.15.8

Reproduction

Adding a <router></router> block (see Usage) in any .vue component causes an error when running yarn dev. No issues with Vue 2 / webpack.

Description

[rollup-plugin-dynamic-import-variables] Unexpected token (4:0)
file: /home/app/pages/index.vue?vue&type=router&index=0&lang.router:4:0

 ERROR  Unexpected token (4:0)

  at Parser.pp$5.raise (node_modules/rollup/dist/shared/rollup.js:19495:13)
  at Parser.pp.unexpected (node_modules/rollup/dist/shared/rollup.js:16820:8)
  at Parser.pp$4.parseExprAtom (node_modules/rollup/dist/shared/rollup.js:18870:10)
  at Parser.pp$4.parseExprSubscripts (node_modules/rollup/dist/shared/rollup.js:18662:19)
  at Parser.pp$4.parseMaybeUnary (node_modules/rollup/dist/shared/rollup.js:18628:17)
  at Parser.pp$4.parseExprOps (node_modules/rollup/dist/shared/rollup.js:18561:19)
  at Parser.pp$4.parseMaybeConditional (node_modules/rollup/dist/shared/rollup.js:18544:19)
  at Parser.pp$4.parseMaybeAssign (node_modules/rollup/dist/shared/rollup.js:18512:19)
  at Parser.pp$4.parseExpression (node_modules/rollup/dist/shared/rollup.js:18480:64)
  at Parser.pp$1.parseStatement (node_modules/rollup/dist/shared/rollup.js:17010:45)
  at Parser.pp$1.parseLabeledStatement (node_modules/rollup/dist/shared/rollup.js:17272:20)
  at Parser.pp$1.parseStatement (node_modules/rollup/dist/shared/rollup.js:17012:21)
  at Parser.pp$1.parseBlock (node_modules/rollup/dist/shared/rollup.js:17296:21)
  at Parser.pp$1.parseStatement (node_modules/rollup/dist/shared/rollup.js:16978:34)
  at Parser.pp$1.parseTopLevel (node_modules/rollup/dist/shared/rollup.js:16877:21)
  at Parser.parse (node_modules/rollup/dist/shared/rollup.js:16658:15)