Skip to content

Commit

Permalink
Merge pull request #686 from Adslot/remove-extra
Browse files Browse the repository at this point in the history
[ADS-645] Remove extra chunk and make moment external
  • Loading branch information
omgaz authored Jan 23, 2018
2 parents 072b1de + 2c49eb6 commit b918f0b
Show file tree
Hide file tree
Showing 60 changed files with 74 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if (process.env.TYPE === 'development') {
plugins = [...plugins, 'react-hot-loader/babel'];
}

const presets = ['env', 'react'];
const presets = process.env.TYPE === 'development' ? [['env', { modules: false }], 'react'] : ['env', 'react'];

module.exports = {
presets,
Expand Down
10 changes: 7 additions & 3 deletions config/dist.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ module.exports = () => {
const buildType = process.env.TYPE || 'development';

let entries = {
main: resolve(__dirname, '../src/dist-entry'),
core: resolve(__dirname, '../src/dist-entry/core'),
extra: resolve(__dirname, '../src/dist-entry/extra'),
main: resolve(__dirname, '../src'),
docs: resolve(__dirname, '../docs/run'),
};
const plugins = [
Expand Down Expand Up @@ -79,6 +77,12 @@ module.exports = () => {
commonjs: 'redux',
amd: 'redux',
},
moment: {
root: 'moment',
commonjs2: 'moment',
commonjs: 'moment',
amd: 'moment',
},
},
output: {
path: resolve(__dirname, '../dist'),
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Contributors/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import _ from 'lodash';
import { Avatar, Spinner, PageTitle } from '../../../src/dist-entry';
import { Avatar, Spinner, PageTitle } from '../../../src';

import './styles.scss';

Expand Down
2 changes: 1 addition & 1 deletion docs/components/Example/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import SyntaxHighlighter from 'react-syntax-highlighter';
import { github } from 'react-syntax-highlighter/dist/styles';
import NotePanel from '../NotePanel';
import { Button, Empty } from '../../../src/dist-entry';
import { Button, Empty } from '../../../src';

import './styles.scss';

Expand Down
2 changes: 1 addition & 1 deletion docs/components/Header/index.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Button, PageTitle, SvgSymbol } from '../../../src/dist-entry';
import { Button, PageTitle, SvgSymbol } from '../../../src';
import './styles.scss';

const HeaderGraphics = () => (
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Layout/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ import SplitPaneExample from '../../examples/SplitPaneExample';
import HoverDropdownMenuExample from '../../examples/HoverDropdownMenuExample';
import NavigationExample from '../../examples/NavigationExample';

import { PageTitle } from '../../../src/dist-entry';
import { PageTitle } from '../../../src';

import './styles.scss';
import '../../examples/styles.scss';
Expand Down
2 changes: 1 addition & 1 deletion docs/components/Navigation/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import PropTypes from 'prop-types';
import _ from 'lodash';
import { Accordion, Button } from '../../../src/dist-entry';
import { Accordion, Button } from '../../../src';
import './styles.scss';

const initialOpenPanel = 'form-elements';
Expand Down
2 changes: 1 addition & 1 deletion docs/components/NotePanel/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import { Panel } from '../../../src/dist-entry';
import { Panel } from '../../../src';

import './styles.scss';

Expand Down
2 changes: 1 addition & 1 deletion docs/components/SearchBar/index.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import PropTypes from 'prop-types';
import { SearchBar } from '../../../src/dist-entry';
import { SearchBar } from '../../../src';
import './styles.scss';

class SearchBarComponent extends React.Component {
Expand Down
2 changes: 1 addition & 1 deletion docs/components/SearchResultCard/index.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'lodash';
import React from 'react';
import PropTypes from 'prop-types';
import { Card, Button, Empty } from '../../../src/dist-entry';
import { Card, Button, Empty } from '../../../src';
import './styles.scss';

const SearchResultCard = ({ navigateTo, clearSearch, searchResults }) => (
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/AccordionExample.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import _ from 'lodash';
import Immutable from 'seamless-immutable';
import Example from '../components/Example';
import { Accordion, Checkbox } from '../../src/dist-entry';
import { Accordion, Checkbox } from '../../src';

const initialState = {
accordionPanels: [
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/AlertExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Alert } from '../../src/dist-entry';
import { Alert } from '../../src';

class AlertExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/AlertInputExample.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import _ from 'lodash';
import Example from '../components/Example';
import { AlertInput } from '../../src/dist-entry';
import { AlertInput } from '../../src';

const initialState = {
impressions: null,
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/AvatarExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Avatar } from '../../src/dist-entry';
import { Avatar } from '../../src';

class AvatarExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/BorderedWellExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { BorderedWell } from '../../src/dist-entry';
import { BorderedWell } from '../../src';

class BorderedWellExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/BreadcrumbExample.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import _ from 'lodash';
import Example from '../components/Example';
import { Button, Breadcrumb } from '../../src/dist-entry';
import { Button, Breadcrumb } from '../../src';

const initialState = {
breadcrumbNodes: [
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ButtonExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Button } from '../../src/dist-entry';
import { Button } from '../../src';

class ButtonExample extends React.PureComponent {
constructor(props) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/CardExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Card } from '../../src/dist-entry';
import { Card } from '../../src';

class CardExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/CarouselExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Carousel } from '../../src/dist-entry';
import { Carousel } from '../../src';

class CarouselExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/CheckboxExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Checkbox } from '../../src/dist-entry';
import { Checkbox } from '../../src';

class CheckboxExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ConfirmModalExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Button, ConfirmModal } from '../../src/dist-entry';
import { Button, ConfirmModal } from '../../src';

class ConfirmModalExample extends React.PureComponent {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/DatePickerExample.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import moment from 'moment';
import Example from '../components/Example';
import { DatePicker } from '../../src/dist-entry';
import { DatePicker } from '../../src';

class DatePickerExample extends React.Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/EmptyExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Empty } from '../../src/dist-entry';
import { Empty } from '../../src';

class EmptyExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/FilePickerExample.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import _ from 'lodash';
import Example from '../components/Example';
import { FilePicker } from '../../src/dist-entry';
import { FilePicker } from '../../src';

class FilePickerExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/FlexibleSpacerExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { FlexibleSpacer } from '../../src/dist-entry';
import { FlexibleSpacer } from '../../src';

class FlexibleSpacerExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/GridExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Grid, GridCell, GridRow } from '../../src/dist-entry';
import { Grid, GridCell, GridRow } from '../../src';

const cellClicked = () => console.log('Cell clicked');

Expand Down
2 changes: 1 addition & 1 deletion docs/examples/HelpIconPopoverExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { HelpIconPopover } from '../../src/dist-entry';
import { HelpIconPopover } from '../../src';

class HelpIconPopoverExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/HoverDropdownMenuExample.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import _ from 'lodash';
import React from 'react';
import Example from '../components/Example';
import { Avatar, HoverDropdownMenu } from '../../src/dist-entry';
import { Avatar, HoverDropdownMenu } from '../../src';

class HoverDropdownMenuExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/InformationBoxExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { InformationBox } from '../../src/dist-entry';
import { InformationBox } from '../../src';

class InformationBoxExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/ListPickerExample.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import Checkbox from 'react-icheck/lib/Checkbox';
import Example from '../components/Example';
import { ListPicker, Button } from '../../src/dist-entry';
import { ListPicker, Button } from '../../src';

const teamMember1 = {
avatar: '//lorempixel.com/35/35/people/7',
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/NavigationExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Nav, NavItem } from '../../src/dist-entry';
import { Nav, NavItem } from '../../src';

class NavigationExample extends React.PureComponent {
constructor(props) {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/PageTitleExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { PageTitle } from '../../src/dist-entry';
import { PageTitle } from '../../src';

class PageTitleExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/PagedGridExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { PagedGrid } from '../../src/dist-entry';
import { PagedGrid } from '../../src';

class PagedGridExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/PanelExample.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import _ from 'lodash';
import Example from '../components/Example';
import { Panel } from '../../src/dist-entry';
import { Panel } from '../../src';

class PanelExample extends React.Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/PrettyDiffExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { PrettyDiff } from '../../src/dist-entry';
import { PrettyDiff } from '../../src';

class PrettyDiffExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/RadioExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Radio, RadioGroup } from '../../src/dist-entry';
import { Radio, RadioGroup } from '../../src';

class RadioExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/SearchBarExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { SearchBar } from '../../src/dist-entry';
import { SearchBar } from '../../src';

class SearchBarExample extends React.Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/SearchExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Search } from '../../src/dist-entry';
import { Search } from '../../src';

class SearchExample extends React.Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/SelectExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Select } from '../../src/dist-entry';
import { Select } from '../../src';

class SelectExample extends React.Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/SliceyExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Slicey } from '../../src/dist-entry';
import { Slicey } from '../../src';

class SliceyExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/SpinnerExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Spinner } from '../../src/dist-entry';
import { Spinner } from '../../src';

class SpinnerExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/SplitPaneExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { SplitPane } from '../../src/dist-entry';
import { SplitPane } from '../../src';

class SplitPaneExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/StatisticExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Statistic } from '../../src/dist-entry';
import { Statistic } from '../../src';

class StatisticExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/SvgSymbolCircleExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { SvgSymbolCircle } from '../../src/dist-entry';
import { SvgSymbolCircle } from '../../src';

class SvgSymbolCircleExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/SvgSymbolExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { SvgSymbol } from '../../src/dist-entry';
import { SvgSymbol } from '../../src';

class SvgSymbolExample extends React.PureComponent {
render() {
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/TabExample.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import Example from '../components/Example';
import { Empty, SvgSymbol, FlexibleSpacer, Tabs, Tab } from '../../src/dist-entry';
import { Empty, SvgSymbol, FlexibleSpacer, Tabs, Tab } from '../../src';

class TabExample extends React.PureComponent {
render() {
Expand Down
Loading

0 comments on commit b918f0b

Please sign in to comment.