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

Following the installation guide for Rollup bundler, after installing the required npm packages, when postcss() is added to rollup.config.js the following error occurs. #83

Open
mgruen opened this issue Jan 6, 2021 · 1 comment

Comments

@mgruen
Copy link

mgruen commented Jan 6, 2021

[!] (plugin svelte) ParseError: Identifier is expected
node_modules\svelma\src\components\Field.svelte
95: <style lang="scss">
96: .field {
97: &.is-grouped {
^
98: .field {
99: flex-shrink: 0;
ParseError: Identifier is expected
at error (C:\dev\svelte1\node_modules\svelte\src\compiler\utils\error.ts:25:16)
at Parser$1.error (C:\dev\svelte1\node_modules\svelte\src\compiler\parse\index.ts:100:3)
at Object.read_style [as read] (C:\dev\svelte1\node_modules\svelte\src\compiler\parse\read\style.ts:21:11)
at tag (C:\dev\svelte1\node_modules\svelte\src\compiler\parse\state\tag.ts:203:27)
at new Parser$1 (C:\dev\svelte1\node_modules\svelte\src\compiler\parse\index.ts:52:12)
at parse (C:\dev\svelte1\node_modules\svelte\src\compiler\parse\index.ts:216:17)
at compile (C:\dev\svelte1\node_modules\svelte\src\compiler\compile\index.ts:79:14)
at Object.transform (C:\dev\svelte1\node_modules\rollup-plugin-svelte\index.js:105:21)
at C:\dev\svelte1\node_modules\rollup\dist\shared\rollup.js:18765:25

@handsome-b-wonderful
Copy link

I needed to make a few updates to get this working.

install postcss ^8.2.4

npm install postcss --save-dev

update your rollup.config.js

import postcss from 'rollup-plugin-postcss'
import preprocess from 'svelte-preprocess'
....

	plugins: [
		...
		svelte({
			...
			preprocess: preprocess(),
		}),

		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