mzohaibqc / antd-theme-webpack-plugin

A webpack plugin for Dynamic theme generation for Ant Design

Home Page:https://mzohaibqc.github.io/antd-theme-webpack-plugin/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dva project demo?

liujunyi opened this issue · comments

Use https://github.com/mzohaibqc/antd-theme-generator for non create-create-react projects. It's pretty simple

Use https://github.com/mzohaibqc/antd-theme-generator for non create-create-react projects. It's pretty simple
thank you! I try your code,it's ok in dev but it's failed after build. lost some less files.
in my code ,i did the following things.

<script> window.less = { async: false, env: 'production' }; </script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/less.js/2.7.2/less.min.js"></script> Now you can update colors by updating less avriables like this

window.less.modifyVars({
'@primary-color': '#0035ff'
})

@liujunyi Can you create a repo with sample code so that I can't look into that. This information is not sufficient to determine what's wrong. :)

Hi! I got the same problem;
I new a project with dva-cli,and then add <script> tags in index.html;
when using window.less.modifyVars(),nothing hanppens;
hmm...my codebox https://codesandbox.io/s/yqolo5x76z
thanks

@kstar11 @liujunyi Kindly first create a dva-cli demo project with Ant Design configured. @kstar11 You codesandbox demo is not properly configured with Ant Design. Css is not working. First create a valid demo so I can try to configure theme plugin

hmm...codescanbox doesn't works...
https://github.com/kstar11/dva-antd-theme-generator
I created a github repo...
thanks

I'll look into this