I am using create-react-app to build my application and it works without any errors or warnings when i run it on development mode. How ever when i use calc and var together in sass I am getting a build error when i run npm run build on the terminal.
transform: translate(calc((var(--i) -1)*-100%));
When i uncomment the mentioned code the build doesn't fail so i am assuming this is where the problem lies.
This is quite odd because it works perfectly when i run npm start.
The error message is the following.
yarn run v1.16.0
$ react-scripts build
Creating an optimized production build...
Failed to compile.
./src/styles/core.scss
ParserError: Syntax Error at line: 1, column 31
error Command failed with exit code 1.