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

Error: Unexpected token (Note that you need plugins to import files that are not JavaScript) #404

Closed
mohamedfrindi opened this issue Nov 26, 2021 · 2 comments

Comments

@mohamedfrindi
Copy link

[!] Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
style.css (1:5)
1: body {
^
2: background: red;
3: }
Error: Unexpected token (Note that you need plugins to import files that are not JavaScript)
at error (C:\Users\med\Desktop\tes\node_modules\rollup\dist\shared\rollup.js:158:30)
at Module.error (C:\Users\med\Desktop\tes\node_modules\rollup\dist\shared\rollup.js:12382:16)
at Module.tryParse (C:\Users\med\Desktop\tes\node_modules\rollup\dist\shared\rollup.js:12785:25)
at Module.setSource (C:\Users\med\Desktop\tes\node_modules\rollup\dist\shared\rollup.js:12688:24)
at ModuleLoader.addModuleSource (C:\Users\med\Desktop\tes\node_modules\rollup\dist\shared\rollup.js:22148:20)
at async ModuleLoader.fetchModule (C:\Users\med\Desktop\tes\node_modules\rollup\dist\shared\rollup.js:22201:9)
at async Promise.all (index 0)
at async ModuleLoader.fetchStaticDependencies (C:\Users\med\Desktop\tes\node_modules\rollup\dist\shared\rollup.js:22236:34)
at async Promise.all (index 0)
at async ModuleLoader.fetchModule (C:\Users\med\Desktop\tes\node_modules\rollup\dist\shared\rollup.js:22212:9)

@JunwuHuang
Copy link

this error seems not from rollup-plugin-postcss.

maybe you need @rollup/plugin-node-resolve to resolve file not js format.

@mohamedfrindi
Copy link
Author

Thank you, the problem has been solved and the problem is really not from postcss

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants