From 86fa5b3f78013787b4f6801b989edb700feaaec7 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Fri, 15 Jul 2016 20:07:31 +0100 Subject: [PATCH] Add some "basic" configuration --- .babelrc | 12 ++ .gitignore | 2 + build/bundle.js | 401 ----------------------------------------- devServer.js | 15 ++ index.css | 4 - index.js | 3 - package.json | 17 ++ src/App.css | 5 + src/App.js | 12 ++ src/index.js | 7 + webpack.config.dev.js | 37 ++++ webpack.config.js | 17 -- webpack.config.prod.js | 40 ++++ 13 files changed, 147 insertions(+), 425 deletions(-) create mode 100644 .babelrc delete mode 100644 build/bundle.js create mode 100644 devServer.js delete mode 100644 index.css delete mode 100644 index.js create mode 100644 src/App.css create mode 100644 src/App.js create mode 100644 src/index.js create mode 100644 webpack.config.dev.js delete mode 100644 webpack.config.js create mode 100644 webpack.config.prod.js diff --git a/.babelrc b/.babelrc new file mode 100644 index 00000000..37133a89 --- /dev/null +++ b/.babelrc @@ -0,0 +1,12 @@ +{ + "presets": ["es2015", "es2016", "react"], + "plugins": ["transform-object-rest-spread"], + "env": { + "production": { + "plugins": [ + "transform-react-constant-elements", + "transform-react-inline-elements" + ] + } + } +} diff --git a/.gitignore b/.gitignore index c2658d7d..bcd22bdb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ node_modules/ +build +.DS_Store diff --git a/build/bundle.js b/build/bundle.js deleted file mode 100644 index a4ae4897..00000000 --- a/build/bundle.js +++ /dev/null @@ -1,401 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; - -/******/ // The require function -/******/ function __webpack_require__(moduleId) { - -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; - -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; - -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - -/******/ // Flag the module as loaded -/******/ module.loaded = true; - -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } - - -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; - -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; - -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; - -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - - - __webpack_require__(1); - document.write('hello'); - - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - - // style-loader: Adds some css to the DOM by adding a