Open atom-git opened 3 years ago
@atom-git I've created and tested this plugin with Ant Design for React so it might not work in other ant design based libraries like antv or ant mobile. Even with the addition of dark theme and logic around that, it's is becoming difficult to handle all scenarios. I am too busy these days and I don;t have time to look into this. I might work on this but can not assure you. Any contribution to these fixes is most welcome.
@atom-git I've created and tested this plugin with Ant Design for React so it might not work in other ant design based libraries like antv or ant mobile. Even with the addition of dark theme and logic around that, it's is becoming difficult to handle all scenarios. I am too busy these days and I don;t have time to look into this. I might work on this but can not assure you. Any contribution to these fixes is most welcome.
thank you for your replay, in my situation, first time compile is successed, dynamic theme change works fine, but when i changed the *.less file which contains in "stylesDir" directory, trigger the plugin recompile, then npm run serve blocking, with a minutes later, show the error message above, I will continue work on this I guess it may involved by the file writing is not turned off or there is a lock problem
You can disable recompilation on code updates using "generateOnce" option. Look into Readme.md file. When you will set this to true, it will be only compiled once. Hope it will solve your problem.
On Thu, 24 Jun 2021, 10:21 am atom-git, @.***> wrote:
@atom-git https://github.com/atom-git I've created and tested this plugin with Ant Design for React so it might not work in other ant design based libraries like antv or ant mobile. Even with the addition of dark theme and logic around that, it's is becoming difficult to handle all scenarios. I am too busy these days and I don;t have time to look into this. I might work on this but can not assure you. Any contribution to these fixes is most welcome.
thank you for your replay, in my situation, first time compile is successed, dynamic theme change works fine, but when i changed the *.less file which contains in "stylesDir" directory, trigger the plugin recompile, then npm run serve blocking, with a minutes later, show the error message above, I will continue work on this I guess it may involved by the file writing is not turned off or there is a lock problem
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/mzohaibqc/antd-theme-webpack-plugin/issues/98#issuecomment-867343895, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIBRK6G6RRLOOIR6BMW7Q3TUK6EXANCNFSM47E552MA .
You can disable recompilation on code updates using "generateOnce" option. Look into Readme.md file. When you will set this to true, it will be only compiled once. Hope it will solve your problem. … On Thu, 24 Jun 2021, 10:21 am atom-git, @.**> wrote: @atom-git https://github.com/atom-git I've created and tested this plugin with Ant Design for React so it might not work in other ant design based libraries like antv or ant mobile. Even with the addition of dark theme and logic around that, it's is becoming difficult to handle all scenarios. I am too busy these days and I don;t have time to look into this. I might work on this but can not assure you. Any contribution to these fixes is most welcome. thank you for your replay, in my situation, first time compile is successed, dynamic theme change works fine, but when i changed the .less file which contains in "stylesDir" directory, trigger the plugin recompile, then npm run serve blocking, with a minutes later, show the error message above, I will continue work on this I guess it may involved by the file writing is not turned off or there is a lock problem — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#98 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADIBRK6G6RRLOOIR6BMW7Q3TUK6EXANCNFSM47E552MA .
set "generateOnce" option will cause *.less file can not recompile, new style config does not effect
@atom-git IMO, when someone is using this plugin, he does not require to modify theme with every change but after creating a static build and for production (no development phase). But if still you need this, you can try using some old verrsion of antd like 3.x.x etc
@mzohaibqc understand,thank you very much
Describe the bug every time when project recompile pending at 95% emitting AntDesignThemePlugin, after a flew minutes, report "JavaScript heap out of memory" error
env vue3.x and ant design vue2.x
Show your code
const themeOptions = { varFile: path.join(dirname, './src/config/theme/default.less'), antDir: path.join(dirname, './node_modules/ant-design-vue'), stylesDir: path.join(dirname, "./src"), // 合并dark与default中的样式Vars themeVariables: Array.from(new Set([ ...Object.keys(defaultVars), ...Object.keys(darkVars) ])), generateOnce: false, // 配置antd-theme-generator写出color.less的位置 outputFilePath: path.join(dirname, './public/theme/color.less') }
Screenshots
Version idea2021 vue3.x webpack 4.46.0 ant design vue 2.x