Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to use without create-react-app #6

Open
khushhal opened this issue Feb 3, 2019 · 3 comments
Open

Trying to use without create-react-app #6

khushhal opened this issue Feb 3, 2019 · 3 comments

Comments

@khushhal
Copy link

khushhal commented Feb 3, 2019

I added the config-override.js, variable.less and also index.less file.

and in webpack i added this configuration

const options = {
  stylesDir: path.join(__dirname, './../'),
  antDir: path.join(__dirname, './../node_modules/antd'),
  varFile: path.join(__dirname, './../variables.less'),
  mainLessFile: path.join(__dirname, './../index.less'),
  themeVariables: ['@primary-color', '@text-color'],
}

const themePlugin = new AntDesignThemePlugin(options);

but on running the development webpack server i am getting this error

node_modules/antd/lib/style/index.less in Missed semicolon
You tried to parse Less with the standard CSS parser; try again with the postcss-less parser.

can you point out is i am doing something wrong or is there any issue with using without create-react-app boilerplate.

@mzohaibqc
Copy link
Owner

@khushhal Are you sure this antDir: path.join(__dirname, './../node_modules/antd'), is correct? Becuase config-overrides.js is in root directory so antd path should be antDir: path.join(__dirname, './node_modules/antd'),

Let me know if that's the case.

@khushhal
Copy link
Author

khushhal commented Feb 3, 2019

Yeah it correct, the webpack file is not in root directory its under config folder. is it required to webpack file in root directory ?

@mzohaibqc
Copy link
Owner

@khushhal It should be in root directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants