Rollup error: Unexpected character '@'
See original GitHub issueEnvironment
npx nuxi info
Reproduction
npx nuxi info
Describe the bug
ERROR Importing directly from a nuxt.config file is not allowed. Instead, use runtime config or a module. [importing /nuxt.config.ts from index.html] 14:18:22
ERROR Importing directly from a nuxt.config file is not allowed. Instead, use runtime config or a module. [importing /nuxt.config.ts.cjs from index.html] 14:18:22
i Vite client warmed up in 1510ms 14:18:23
ERROR nuxt3/nuxt cannot be imported directly. Instead, import runtime Nuxt composables from #app or #imports. [importing nuxt from nuxt.config.ts]
Additional context
No response
Logs
No response
Issue Analytics
- State:
- Created a year ago
- Comments:17 (3 by maintainers)
Top Results From Across the Web
Unexpected character '@' (Note that you need plugins to ...
I was having the same issue with importing css file, the error was [!] Error: Unexpected character '@' (Note that you need plugins...
Read more >@rollup/plugin-typescript - npm
Seamless integration between Rollup and TypeScript.. Latest version: 10.0.1, last published: a month ago.
Read more >How to Bundle JavaScript With Rollup — Step-by-Step Tutorial
Learn how to use Rollup as a smaller, more efficient alternative to webpack and Browserify to bundle JavaScript files in this step-by-step tutorial...
Read more >rollup打包报错:error: Unexpected “<“_丸子CC的博客
[!] Error: Unexpected character '@' (Note that you need plugins to import files that are not JavaScript) styles\index.scss (1:0) ...
Read more >@rollup/plugin-typescript - npm package | Snyk
Learn more about @rollup/plugin-typescript: package health score, ... Error: Unexpected token (Note that you need plugins to import files that are not ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I suspect a very similar issue.
The issue
Rollup error: Unexpected character '@'
is triggered byswiper/vue
importing from a css file. Settingbuild.transpile
to['swiper']
in yournuxt.config
should resolve it.