Skip to content

Commit

Permalink
Revert "[minor][feat] implement code splitting support with webpack 3. (
Browse files Browse the repository at this point in the history
#538)"

This reverts commit 3540cc0.
  • Loading branch information
khayong authored and jchip committed Oct 6, 2017
1 parent 32c1598 commit d88513e
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
],
"transform-node-env-inline",
"lodash",
"transform-runtime",
"syntax-dynamic-import"
"transform-runtime"
],
"env": {
"production": {
Expand Down
2 changes: 0 additions & 2 deletions packages/electrode-archetype-react-app-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
"babel-core": "^6.4.0",
"babel-eslint": "^7.0.0",
"babel-loader": "^7.0.0",
"babel-plugin-dynamic-import-node": "^1.0.2",
"babel-plugin-dynamic-import-webpack": "^1.0.1",
"babel-plugin-i18n-id-hashing": "^2.1.0",
"babel-plugin-lodash": "^3.1.3",
"babel-plugin-minify-dead-code-elimination": "^0.1.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/electrode-archetype-react-app/arch-clap.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ Individual .babelrc files were generated for you in src/client and src/server
desc: false,
dep: [".clean.lib:client", ".mk.lib.client.dir", ".build.client.babelrc"],
task: mkCmd(
`babel --plugins dynamic-import-node`,
`babel`,
`--source-maps=inline --copy-files --out-dir ${AppMode.lib.client}`,
`${AppMode.src.client}`
)
Expand Down Expand Up @@ -572,7 +572,7 @@ Individual .babelrc files were generated for you in src/client and src/server
.map(n => `--watch ${n}`)
.join(" ");
AppMode.setEnv(AppMode.src.dir);
const node = AppMode.isSrc ? `babel-node --plugins dynamic-import-node` : "node";
const node = AppMode.isSrc ? `babel-node` : "node";
const serverIndex = Path.join(AppMode.src.server, "index.js");
return exec(
`nodemon`,
Expand Down
3 changes: 1 addition & 2 deletions packages/electrode-archetype-react-app/config/babel/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@
],
"transform-node-env-inline",
"lodash",
"transform-runtime",
"syntax-dynamic-import"
"transform-runtime"
],
"env": {
"production": {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* To start your own app, please replace or remove these files:
*
* - this file (home.jsx)
* - demo-code-splitting.jsx
* - demo-buttons.jsx
* - demo-pure-states.jsx
* - demo-states.jsx
Expand All @@ -16,8 +15,6 @@
*/

import React from "react";
import PropTypes from "prop-types";
import { Link } from "react-router";
import "../styles/normalize.css";
import "../styles/raleway.css";
import skeleton from "../styles/skeleton.css";
Expand All @@ -30,48 +27,28 @@ import { DemoButtons } from "./demo-buttons";
import Notifications from "react-notify-toast";
/*<% } %>*/

const Home = props => {
const {children} = props;

return (
<div className={custom.container}>
{/*<% if (pwa) { %>*/}
<Notifications />
{/*<% } %>*/}

<section className={custom.header}>
<h2 className={skeleton.title}>
Hello from {" "}
<a href="https://github.com/electrode-io">{"Electrode"} <img
src={electrodePng}/></a>
</h2>
</section>

<div className={custom["docs-section"]}>
<DemoStates/>
</div>

<div className={custom["docs-section"]}>
<DemoPureStates/>
</div>

<div className={custom["docs-section"]}>
<DemoButtons/>
</div>

<div className={custom["docs-section"]}>
<h6 className={custom["docs-header"]}>
Demo Code Splitting <Link to="/splitting">Load Here</Link>
</h6>

{children}
</div>
export default () =>
<div className={custom.container}>
{/*<% if (pwa) { %>*/}
<Notifications />
{/*<% } %>*/}

<section className={custom.header}>
<h2 className={skeleton.title}>
Hello from {" "}
<a href="https://github.com/electrode-io">{"Electrode"} <img src={electrodePng} /></a>
</h2>
</section>

<div className={custom["docs-section"]}>
<DemoStates />
</div>
);
};

Home.propTypes = {
children: PropTypes.node
};
<div className={custom["docs-section"]}>
<DemoPureStates />
</div>

export default Home;
<div className={custom["docs-section"]}>
<DemoButtons />
</div>
</div>;
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import React from "react";
import { Route } from "react-router";
import Home from "./components/home";

export const routes = {
path: "/",
component: Home,
childRoutes: [{
path: "splitting",
getComponent(nextState, callback) {
import(/* webpackChunkName: "splitting" */ "./components/demo-code-splitting").then(module => {
callback(null, module.default);
});
}
}]
};
export const routes = <Route path="/" component={Home} />;

0 comments on commit d88513e

Please sign in to comment.