From 6bea326493f90cab6d056516a0e7983ce1d8dc5f Mon Sep 17 00:00:00 2001 From: Mohamed El Mahallawy Date: Fri, 2 Dec 2016 01:37:57 -0800 Subject: [PATCH 1/2] Code splitting to work --- package.json | 3 ++- src/components/Audioplayer/index.js | 6 +++--- src/components/Ayah/index.js | 6 +++--- src/components/FontStyles/index.js | 2 +- src/components/Footer/index.js | 6 +++--- src/components/Home/LastVisit/index.js | 2 +- src/components/Home/QuickSurahs/index.js | 2 +- src/components/Home/SurahsList/index.js | 2 +- src/components/IndexHeader/index.js | 4 ++-- src/components/LazyLoad/index.js | 2 +- src/components/Line/index.js | 2 +- src/components/ReadingModeToggle/index.js | 2 +- src/components/SearchAutocomplete/index.js | 2 +- src/components/SearchInput/index.js | 4 ++-- src/components/TooltipDropdown/index.js | 2 +- src/containers/About/index.js | 2 +- src/containers/App/index.js | 6 +++--- src/containers/Contact/index.js | 2 +- src/containers/Donations/index.js | 2 +- src/containers/Error/index.js | 2 +- src/containers/Home/index.js | 4 ++-- src/containers/Search/Header/index.js | 2 +- src/containers/Search/index.js | 6 +++--- src/containers/Surah/Header/index.js | 2 +- src/containers/Surah/connect.js | 4 ++-- src/containers/Surah/index.js | 11 +++++------ src/helpers/ApiClient.js | 2 +- src/redux/actions/audioplayer.js | 2 +- src/redux/actions/auth.js | 2 +- src/redux/actions/ayahs.js | 4 ++-- src/redux/actions/bookmarks.js | 4 ++-- src/redux/actions/fontFace.js | 2 +- src/redux/actions/media.js | 2 +- src/redux/actions/options.js | 2 +- src/redux/actions/search.js | 4 ++-- src/redux/actions/spec.js | 6 +++--- src/redux/actions/surahs.js | 4 ++-- src/redux/modules/audioplayer.js | 6 +++--- src/redux/modules/auth.js | 2 +- src/redux/modules/ayahs.js | 2 +- src/redux/modules/bookmarks.js | 2 +- src/redux/modules/fontFaces.js | 6 +++--- src/redux/modules/lines.js | 4 ++-- src/redux/modules/media.js | 2 +- src/redux/modules/options.js | 2 +- src/redux/modules/searchResults.js | 2 +- src/redux/modules/surahs.js | 2 +- src/redux/schemas.js | 6 +++--- src/routes.js | 4 ++-- src/server/config/sitemap.js | 2 +- webpack/dev.config.js | 1 + webpack/prod.config.js | 1 + 52 files changed, 85 insertions(+), 83 deletions(-) diff --git a/package.json b/package.json index 354ab812a..2439c0b3b 100644 --- a/package.json +++ b/package.json @@ -110,7 +110,7 @@ "superagent": "1.8.4", "url": "0.11.0", "url-loader": "0.5.7", - "webpack": "2.1.0-beta.20", + "webpack": "2.1.0-beta.27", "webpack-isomorphic-tools": "2.5.7", "winston": "1.1.2" }, @@ -162,6 +162,7 @@ "wdio-mocha-framework": "0.3.7", "wdio-spec-reporter": "0.0.3", "webdriverio": "4.2.1", + "webpack": "2.1.0-beta.21", "webpack-dev-server": "1.6.5", "webpack-hot-middleware": "2.12.2" }, diff --git a/src/components/Audioplayer/index.js b/src/components/Audioplayer/index.js index 4ded1c2c3..07ab98f19 100644 --- a/src/components/Audioplayer/index.js +++ b/src/components/Audioplayer/index.js @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { camelize } from 'humps'; // Redux -import * as AudioActions from '../../redux/actions/audioplayer'; +import * as AudioActions from 'redux/actions/audioplayer'; // Components import Track from './Track'; @@ -12,8 +12,8 @@ import ScrollButton from './ScrollButton'; import RepeatDropdown from './RepeatDropdown'; // Helpers -import debug from '../../helpers/debug'; -import scroller from '../../utils/scroller'; +import debug from 'helpers/debug'; +import scroller from 'utils/scroller'; const style = require('./style.scss'); diff --git a/src/components/Ayah/index.js b/src/components/Ayah/index.js index 3f467a3e3..44ab165b4 100644 --- a/src/components/Ayah/index.js +++ b/src/components/Ayah/index.js @@ -2,11 +2,11 @@ import React, { Component, PropTypes } from 'react'; import Link from 'react-router/lib/Link'; import { Element } from 'react-scroll'; -import Copy from '../Copy'; +import Copy from 'components/Copy'; -import debug from '../../helpers/debug'; +import debug from 'helpers/debug'; -import bindTooltip from '../../utils/bindTooltip'; +import bindTooltip from 'utils/bindTooltip'; const styles = require('./style.scss'); diff --git a/src/components/FontStyles/index.js b/src/components/FontStyles/index.js index b147dbe2e..79622e38b 100644 --- a/src/components/FontStyles/index.js +++ b/src/components/FontStyles/index.js @@ -1,6 +1,6 @@ import React, { Component, PropTypes } from 'react'; import { connect } from 'react-redux'; -import { fontFaceStyle, fontFaceStyleLoaded } from '../../helpers/buildFontFaces'; +import { fontFaceStyle, fontFaceStyleLoaded } from 'helpers/buildFontFaces'; import { load } from 'redux/actions/fontFace.js'; import debug from 'helpers/debug'; diff --git a/src/components/Footer/index.js b/src/components/Footer/index.js index 89c95f8d4..6b7300302 100644 --- a/src/components/Footer/index.js +++ b/src/components/Footer/index.js @@ -1,4 +1,4 @@ -import React, { Component, PropTypes } from 'react'; +import React from 'react'; import Link from 'react-router/lib/Link'; import Grid from 'react-bootstrap/lib/Grid'; @@ -15,8 +15,8 @@ const Footer = () => (

Navigate