【发布时间】:2020-05-22 21:53:49
【问题描述】:
我在我的 Gatsby 项目中使用 Augmented UI,在开发模式下一切都很好。
当我使用构建命令时,我得到了这个日志错误:
info bootstrap finished - 4.630 s
⠀
failed Building production JavaScript and CSS bundles - 9.761s
ERROR #98123 WEBPACK
Generating JavaScript bundles failed
Parse error on line 1:
...n-x, calc(var(--aug-_TlJoinRX, 0px)/2 + var(--aug-_TrJoinLX, 100%)/2)) + var(--...
------------------------------------------------------------------------^
Expecting end of input, "ADD", "SUB", "MUL", "DIV", got unexpected "RPAREN"
not finished run queries - 9.857s
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! project@1.0.0 build: `gatsby build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the project@1.0.0 build script.
经过一些研究,PostCSS 似乎无法与 Augmented UI 一起工作(在 calc 函数上)。
我无法找到禁用 PostCSS 的方法。
我的依赖版本是:
"gatsby": "^2.18.5",
"gatsby-plugin-postcss": "^2.1.16"
我现在的postcss.config.js 是这样的:
module.exports = () => ({
plugins: [require('tailwindcss')],
})
感谢您对此问题的任何帮助。
【问题讨论】:
标签: javascript css webpack gatsby postcss