diff --git a/README.md b/README.md index 2a19881..6c4630b 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,2 @@ -### webpack -this's a cute&awesome webpack template. -### TODO -- [ ] add `React 16.x` + `Redux` + `React-Router4.x` -- [ ] add `React Server Rendering` -### plugins -- [webpack](https://github.com/webpack/webpack) -- [webpack-merge](https://github.com/survivejs/webpack-merge) -- [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) -- [clean-webpack-plugin](https://github.com/johnagan/clean-webpack-plugin) -- [extract-text-webpack-plugin](https://github.com/webpack-contrib/extract-text-webpack-plugin) -## production or development -### default config -![](./screenshots/dev.png) -### when i add `process.env.production` -![](./screenshots/prod.png) -``` -plugins: [ - new webpack.DefinePlugin({ - 'process.env': { - NODE_ENV: '"production"' - } - }) -] -``` \ No newline at end of file +### webpack-jsx-react +this's a webpack-jsx-react template. \ No newline at end of file diff --git a/src/index.js b/src/index.js index d569093..94b0a32 100644 --- a/src/index.js +++ b/src/index.js @@ -2,7 +2,7 @@ console.log(2); document.write('

Hello World

'); if (__DEV__) { - document.write(new Date()); + document.write(new Date()); } // console.log(process.env.NODE_ENV); // 样式测试 @@ -14,10 +14,10 @@ import React, { Fragment } from 'react'; import ReactDOM from 'react-dom'; console.log(ReactDOM); function App(){ - return ( - - Hello, world! - - ) + return ( + + Hello, world! + + ) } ReactDOM.render(,document.getElementById('root')) \ No newline at end of file