From 8ed77954959ede6e99cc6b4e08851258cab932b4 Mon Sep 17 00:00:00 2001 From: luffyZhou Date: Mon, 12 Nov 2018 01:09:30 +0800 Subject: [PATCH] update && optimize with-ant-design-less example (#5658) Current with-ant-design-less example has some problems. - Upgrade next7, console found a 404 error. ![](https://user-gold-cdn.xitu.io/2018/11/11/167015fb80017e79?w=2606&h=1000&f=jpeg&s=124801) > After upgrade next7, .next folder didn't find /static/style.css and there is /static/css/style.chunk.css. - The /_next/static/style.css link don't need be placed in the tag. The style.chunk.css file will be add in the head tag automatically after build. - The project with more pages include _app.js, _document.js...the antd-custom.less will not work well. > The solution is use `modifyVars` of `lessLoaderOptions`. It work well in my project~ --- .../with-ant-design-less/asserts/antd-custom.less | 4 ++-- examples/with-ant-design-less/index.js | 1 - examples/with-ant-design-less/next.config.js | 13 +++++++++++++ examples/with-ant-design-less/package.json | 1 + 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/examples/with-ant-design-less/asserts/antd-custom.less b/examples/with-ant-design-less/asserts/antd-custom.less index 027ab897..27ee020e 100644 --- a/examples/with-ant-design-less/asserts/antd-custom.less +++ b/examples/with-ant-design-less/asserts/antd-custom.less @@ -1,4 +1,4 @@ -@primary-color: #1DA57A; +@primary-color: #52c41a; @layout-header-height: 40px; -@border-radius-base: 0px; +@border-radius-base: 2px; diff --git a/examples/with-ant-design-less/index.js b/examples/with-ant-design-less/index.js index e462540b..1ff38756 100644 --- a/examples/with-ant-design-less/index.js +++ b/examples/with-ant-design-less/index.js @@ -7,7 +7,6 @@ export default ({ children }) => -