You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CssSyntaxError: [postcss] /home/projects/vite-qf1xbf/app.js-unocss-hash.css:55:331: Double colon
at Input.error (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/input.js:148:16)
at Parser.doubleColon (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:561:22)
at Parser.colon (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:516:16)
at Parser.checkMissedSemicolon (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:581:22)
at Parser.decl (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:279:12)
at Parser.other (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:128:18)
at Parser.parse (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:72:16)
at parse (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parse.js:11:12)
at new LazyResult (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/lazy-result.js:133:16)
at Processor.process (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/processor.js:28:14)
Weirdly enough, the multi-line syntax works in my local environment, but it throws Missed semicolon exception in StackBlitz:
return [
Baz::class
];
CssSyntaxError: [postcss] /home/projects/vite-qf1xbf/assets/app.!~{001}~.js-unocss-hash.css:55:335: Missed semicolon
at Input.error (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/input.js:148:16)
at Parser.checkMissedSemicolon (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:596:22)
at Parser.decl (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:279:12)
at Parser.other (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:128:18)
at Parser.parse (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parser.js:72:16)
at parse (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/parse.js:11:12)
at new LazyResult (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/lazy-result.js:133:16)
at Processor.process (file:///home/projects/vite-qf1xbf/node_modules/postcss/lib/processor.js:28:14)
at compileCSS (file://file:///home/projects/vite-qf1xbf/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:36610:14)
at async Object.transform (file://file:///home/projects/vite-qf1xbf/node_modules/vite/dist/node/chunks/dep-5e7f419b.js:36075:56)
I narrowed this down to the [Baz::class] being added as a token in GlobalModeBuildPlugin(), later passed down into uno.generate(tokens).
Test suite (added to ./test/preset-icons.test.ts):
We have encountered a weird issue with UnoCSS parser.
See Example 3 - PHP array syntax on StackBlitz.
Steps to reproduce:
./docs/.vitepress/theme/index.ts
withimport 'uno.css'
presetWebFonts()
to./docs/vite.config.js
(same thing happens withpresetIcons()
in my local environment)./docs/example3.md
with the following content (remove last \)npm run docs:build
UnoCSS throws
Double semicolon
error with this CSS section ininput.source
using thebuild
command, and similar error using thedev
command..\\[Baz\\:\\:class\\]{Baz::class;}.\\[foo\\:bar\\:baz\\]{foo:bar:baz;}
Weirdly enough, the multi-line syntax works in my local environment, but it throws
Missed semicolon
exception in StackBlitz:I narrowed this down to the
[Baz::class]
being added as atoken
inGlobalModeBuildPlugin()
, later passed down intouno.generate(tokens)
.Test suite (added to
./test/preset-icons.test.ts
):The text was updated successfully, but these errors were encountered: