GithubHelp home page GithubHelp logo

Comments (10)

mzohaibqc avatar mzohaibqc commented on June 2, 2024 4

@jamesmstone Here are some hints, try this and if it works, update here so others can benefit from your learning

https://github.com/arackaf/customize-cra#addwebpackpluginplugin

const AntDesignThemePlugin = require('antd-theme-webpack-plugin');
const {
  override,
  addWebpackPlugin,
  addLessLoader
} = require("customize-cra");
const options = {
  stylesDir: path.join(__dirname, './src/less'),
  antDir: path.join(__dirname, './node_modules/antd'),
  varFile: path.join(__dirname, './src/less/vars.less'),
  mainLessFile: path.join(__dirname, './src/less/main.less'),
  themeVariables: [
    '@primary-color',
  ],
  indexFileName: 'index.html',
  generateOnce: false // generate color.less on each compilation
}

module.exports = override(
  addLessLoader({
    modifyVars: {
      '@primary-color': '#00375B'
    },
    javascriptEnabled: true
  }),
addWebpackPlugin(new AntDesignThemePlugin (options))
);

from antd-theme-webpack-plugin.

jamesmstone avatar jamesmstone commented on June 2, 2024 3

Another alternative might be craco or in particular: craco-antd.

from antd-theme-webpack-plugin.

mzohaibqc avatar mzohaibqc commented on June 2, 2024 2

@jamesmstone @buquan Here is a demo using customize-cra
https://mzohaibqc.github.io/antd-theme-webpack-plugin/index.html

And here is code for this demo
https://github.com/mzohaibqc/antd-theme-webpack-plugin/tree/master/examples/customize-cra

from antd-theme-webpack-plugin.

jamesmstone avatar jamesmstone commented on June 2, 2024

If so, it would be great to also update the create-react-app example!

from antd-theme-webpack-plugin.

Dppatra avatar Dppatra commented on June 2, 2024

Screenshot from 2019-07-18 17-16-27

This one is not working in (customize-cra: 0.4.1)

from antd-theme-webpack-plugin.

mzohaibqc avatar mzohaibqc commented on June 2, 2024

@Dppatra You should have seen the docs. You are not using the correct case for function name. It is addWebpackPlugin and not addwebpackpluginplugin

https://github.com/arackaf/customize-cra/blob/master/api.md#addwebpackpluginplugin

from antd-theme-webpack-plugin.

buquan avatar buquan commented on June 2, 2024

addwebpackpluginplugin is not a function@ @mzohaibqc

from antd-theme-webpack-plugin.

mzohaibqc avatar mzohaibqc commented on June 2, 2024

@buquan you should have seen the above comments. it's clearly saving it is addWebpackPlugin and not addwebpackpluginplugin.

https://github.com/arackaf/customize-cra/blob/master/api.md#addwebpackpluginplugin

from antd-theme-webpack-plugin.

buquan avatar buquan commented on June 2, 2024

use addWebpackPlugin methods can't work , it maintains 'Starting the development server...'

from antd-theme-webpack-plugin.

mzohaibqc avatar mzohaibqc commented on June 2, 2024

@buquan I've not tried this my self, do some changes, see the docs, you may get success

from antd-theme-webpack-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.