I have a couple of files that set up the theme and style variables for my App. I have them each in their own file and I import one another using the import syntax. I keep getting this compilation error when using customizeTheme and starting the App:
eg: let´s assume it says import fontSize from "./fontSize"
SyntaxError: Cannot use import statement outside a module
The config is as follows:
const CracoAntDesignPlugin = require("craco-antd");
const { customVariables } = require("./src/styles/styles");
module.exports = {
plugins: [
{
plugin: CracoAntDesignPlugin,
options: {
customizeTheme: {
customVariables,
},
javascriptEnabled: true,
},
},
],
};