Open frans-vectra opened 3 years ago
It doesn't work on my side. Switching it to the beginning has not effect.
[1/4] 🤔 Why do we have the module "postcss-calc"...?
[2/4] 🚚 Initialising dependency graph...
[3/4] 🔍 Finding dependency...
[4/4] 🚡 Calculating file sizes...
=> Found "postcss-calc@7.0.5"
info Reasons this module exists
- "nuxt#@nuxt#webpack#cssnano#cssnano-preset-default" depends on it
- Hoisted from "nuxt#@nuxt#webpack#cssnano#cssnano-preset-default#postcss-calc"
info Disk size without dependencies: "232KB"
info Disk size with unique dependencies: "1.34MB"
info Disk size with transitive dependencies: "2.24MB"
info Number of shared dependencies: 7
I found a temporary fix, I just assign the negative value to a new property and it works.
/* This will throw an error */
property: calc(var(--some-value) * -1);
/* This will work */
--minus-one: var(-1);
property: calc(var(--some-value) * var(--minus-one));
Strangely I cannot reproduce this using only postcss-cli.
I have resolve this with moving zero to the start
left: calc(0px - (var(--full-width) - 100%) / 2);
¯\_(ツ)_/¯
I have got an build error in Nuxt
with yarn build
Hi, I've been getting a parse syntax error while trying to make a production build of Vue Storefront 2 Magento theme project.
The error specifically occurs when trying to parse something like
calc(var(--my-var) * -1)
;e.g.
By just changing the order of the terms in the calc statement it works correctly;
e.g.
Environment
v11.6
v14.16.1
v6.14.12
v1.22.10
v1.0.0-rc.3
v7.0.32
Reproduction steps
$ npx @vue-storefront/cli init
Magento 2 (beta)
integration option.env.example
as.env
and update the Magento integration URLs (MAGENTO_GRAPHQL
,MAGENTO_EXTERNAL_CHECKOUT_URL
)$ yarn install
$ yarn dev
(everything works in dev mode)$ yarn build
(build fails with the postcss errors)