Skip to content

Commit

Permalink
Imports AntD CSS file only during development time
Browse files Browse the repository at this point in the history
because babel-plugin-import will add just enough CSS via webpack plugin wired by react-app-rewire
  • Loading branch information
dance2die committed Sep 16, 2018
1 parent 26ea26f commit d634dd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ import { Layout, Row, Col } from "antd";
import Wizard from "./container/Wizard";
import AppFooter from "./components/AppFooter";

import "antd/dist/antd.css";
import "./styles.css";

// CodeSandBox doesn't honor react-app-rewire.
// So let's import it during development mode only.
// When published on Netlify, it'd be stripped off.
if (process.env.NODE_ENV === "development") {
import("antd/dist/antd.css");
}

const { Content } = Layout;
const dimension = {
span: 20,
Expand Down

0 comments on commit d634dd3

Please sign in to comment.