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
Go into the file packages/nuxt/src/module.ts and comment out the line disabling calc for cssnano:
Run pnpm run build:all
cd into packages/nuxt
Run pnpm run dev:build
You will see vite starting to build the client and then just hanging up because the calc plugin isn't able to work with the expression calc(infinity * 1s) used inside packages/sit-onyx/src/components/OnyxInput/OnyxInput.vue.
Version
9.0.1
Environment
System:
OS: macOS 14.5
CPU: (10) arm64 Apple M1 Max
Memory: 932.81 MB / 32.00 GB
Shell: 5.9 - /bin/zsh
I got here as I encountered a bug within a Nuxt Js app using css with the statement calc(infinity *1s). It worked during development but at build time vite just hung up so I investigated further. Turns out nuxt uses postcss with nanocss by default. Nanocss again includes this plugin which causes the issue.
It would be really great if the plugin could support these relatively new but stable constants. Thanks
The text was updated successfully, but these errors were encountered:
…x using the calc-constant infinity (#1261)
Building a nuxt project using the module would just hang up due to an
issue within the postcss plugin "calc" used by nanocss which is used by
nuxt's default postcss config.
This fix simply disables the plugin for nuxt projects using the module
for now. An issue was created for the postcss plugin (see:
postcss/postcss-calc#210)
Describe the bug
Running the plugin fails on css containing a calculation using constant values. (See: https://developer.mozilla.org/en-US/docs/Web/CSS/calc-constant)
Expected behaviour
I'd expect the plugin to support calc-constant values or to at least not touch calculations it can't optimize to not cause such issues.
Steps to reproduce
Either create a new nuxt app and use
calc(infinity * 1px)
somewhere inside the css and try to run a build or:pnpm i
packages/nuxt/src/module.ts
and comment out the line disabling calc for cssnano:pnpm run build:all
packages/nuxt
pnpm run dev:build
You will see vite starting to build the client and then just hanging up because the calc plugin isn't able to work with the expression
calc(infinity * 1s)
used insidepackages/sit-onyx/src/components/OnyxInput/OnyxInput.vue
.Version
9.0.1
Environment
Package details
Additional context
I got here as I encountered a bug within a Nuxt Js app using css with the statement
calc(infinity *1s)
. It worked during development but at build time vite just hung up so I investigated further. Turns out nuxt uses postcss with nanocss by default. Nanocss again includes this plugin which causes the issue.It would be really great if the plugin could support these relatively new but stable constants. Thanks
The text was updated successfully, but these errors were encountered: