Commit 62890777 authored by jnsone11's avatar jnsone11
Browse files

finalize NODE_ENV=production

parent d3500424
This diff is collapsed.
webpackJsonp([1],{
/***/ 218:
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const React = __webpack_require__(0);
const graphql_tag_1 = __webpack_require__(74);
const react_apollo_1 = __webpack_require__(38);
const query = graphql_tag_1.default `
webpackJsonp([1],{200:function(e,t,l){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r=l(0),a=l(69),n=l(36),o=a.default`
query getAllAuthors {
allAuthors {
totalCount
......@@ -23,34 +12,4 @@ const query = graphql_tag_1.default `
}
}
}
`;
class AllAuthors extends React.Component {
render() {
if (this.props.data.loading) {
return React.createElement("div", null, "Loading...");
}
else if (this.props.data.error) {
return React.createElement("div", null,
"Error: ",
this.props.data.error.message);
}
return (React.createElement("div", null,
React.createElement("h2", null, "Authors"),
React.createElement("ul", null, this.props.data.allAuthors.nodes.map(author => (React.createElement("li", { key: author.nodeId },
React.createElement("div", null,
"Name: ",
author.name),
React.createElement("div", null,
"NumberOfArticles: ",
author.articlesByAuthorId.totalCount)))))));
}
}
exports.default = react_apollo_1.graphql(query)(AllAuthors);
;(function register() { /* react-hot-loader/webpack */ if (true) { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "C:\\Users\\Jens.Neuse\\repos\\react-workshop\\front-end\\renderine\\src\\common\\components\\allAuthors.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "C:\\Users\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FByb3BzPiB7XHJcbiAgICByZW5kZXIoKSB7XHJcblxyXG4gICAgICAgIGlmICh0aGlzLnByb3BzLmRhdGEubG9hZGluZyl7XHJcbiAgICAgICAgICAgIHJldHVybiA8ZGl2PkxvYWRpbmcuLi48L2Rpdj5cclxuICAgICAgICB9IGVsc2UgaWYgKHRoaXMucHJvcHMuZGF0YS5lcnJvcil7XHJcbiAgICAgICAgICAgIHJldHVybiA8ZGl2PkVycm9yOiB7dGhpcy5wcm9wcy5kYXRhLmVycm9yLm1lc3NhZ2V9PC9kaXY+XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICByZXR1cm4gKFxyXG4gICAgICAgICAgICA8ZGl2PlxyXG4gICAgICAgICAgICAgICAgPGgyPkF1dGhvcnM8L2gyPlxyXG4gICAgICAgICAgICAgICAgPHVsPlxyXG4gICAgICAgICAgICAgICAge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMucHJvcHMuZGF0YS5hbGxBdXRob3JzLm5vZGVzLm1hcChhdXRob3IgPT4gKFxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8bGkga2V5PXthdXRob3Iubm9kZUlkfT5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXY+TmFtZToge2F1dGhvci5uYW1lfTwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdj5OdW1iZXJPZkFydGljbGVzOiB7YXV0aG9yLmFydGljbGVzQnlBdXRob3JJZC50b3RhbENvdW50fTwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L2xpPlxyXG4gICAgICAgICAgICAgICAgICAgICkpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICA8L3VsPlxyXG4gICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICApXHJcbiAgICB9XHJcbn1cclxuXHJcbmV4cG9ydCBkZWZhdWx0IGdyYXBocWw8Z2V0QWxsQXV0aG9yc1F1ZXJ5LFByb3BzLHt9PihxdWVyeSkoQWxsQXV0aG9ycyk7XG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL2NvbW1vbi9jb21wb25lbnRzL2FsbEF1dGhvcnMudHN4Il0sInNvdXJjZVJvb3QiOiIifQ==
\ No newline at end of file
`;t.default=n.graphql(o)(class extends r.Component{render(){return this.props.data.loading?r.createElement("div",null,"Loading..."):this.props.data.error?r.createElement("div",null,"Error: ",this.props.data.error.message):r.createElement("div",null,r.createElement("h2",null,"Authors"),r.createElement("ul",null,this.props.data.allAuthors.nodes.map(e=>r.createElement("li",{key:e.nodeId},r.createElement("div",null,"Name: ",e.name),r.createElement("div",null,"NumberOfArticles: ",e.articlesByAuthorId.totalCount)))))}})}});
\ No newline at end of file
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
......@@ -129,8 +129,6 @@ exports.reducer = (state = initialState, action) => {
};
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/state/reducers/counter.ts"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/state/reducers/counter.ts"); } } })();
/***/ }),
/* 5 */
/***/ (function(module, exports) {
......@@ -189,7 +187,10 @@ if (!IS_PRODUCTION) {
publicPath: "/",
noInfo: true
}));
server.use(__webpack_require__(39)(compiler));
server.use(__webpack_require__(40)(compiler));
}
else {
server.use('/', express.static('dist/client', {}));
}
server.get('*', (req, res) => {
const context = {};
......@@ -207,8 +208,6 @@ server.listen(PORT, HOST, () => {
});
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/server/server.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/server/server.tsx"); } } })();
/***/ }),
/* 11 */
/***/ (function(module, exports) {
......@@ -284,8 +283,6 @@ function default_1(url) {
exports.default = default_1;
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/server/serverRender.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/server/serverRender.tsx"); } } })();
/***/ }),
/* 14 */
/***/ (function(module, exports) {
......@@ -348,8 +345,6 @@ class Routes extends react_1.Component {
exports.default = Routes;
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/routes.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/routes.tsx"); } } })();
/***/ }),
/* 20 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -397,8 +392,6 @@ class Header extends react_1.Component {
exports.default = Header;
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/header.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/header.tsx"); } } })();
/***/ }),
/* 21 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -417,8 +410,6 @@ class Home extends react_1.Component {
exports.default = Home;
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/home.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/home.tsx"); } } })();
/***/ }),
/* 22 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -432,8 +423,6 @@ exports.default = react_async_component_1.asyncComponent({
});
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/asyncAuthors.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/asyncAuthors.tsx"); } } })();
/***/ }),
/* 23 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -483,8 +472,6 @@ class AllAuthors extends React.Component {
exports.default = react_apollo_1.graphql(query)(AllAuthors);
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/allAuthors.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/allAuthors.tsx"); } } })();
/***/ }),
/* 24 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -536,8 +523,6 @@ class AllArticles extends react_1.Component {
exports.default = react_apollo_1.graphql(query)(AllArticles);
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/allArticles.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/allArticles.tsx"); } } })();
/***/ }),
/* 25 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -551,8 +536,6 @@ exports.default = react_async_component_1.asyncComponent({
});
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/asyncFatComponent.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/asyncFatComponent.tsx"); } } })();
/***/ }),
/* 26 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -581,8 +564,6 @@ class FatComponent extends react_1.Component {
exports.default = FatComponent;
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/fatComponent.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/fatComponent.tsx"); } } })();
/***/ }),
/* 27 */
/***/ (function(module, exports) {
......@@ -607,11 +588,9 @@ class StatefulComponent extends react_1.Component {
this.decrease = this.decrease.bind(this);
}
increase() {
console.log('increase');
this.props.increment();
}
decrease() {
console.log('decrease');
this.props.sub(1);
}
render() {
......@@ -634,8 +613,6 @@ exports.default = react_redux_1.connect((state) => ({
})(StatefulComponent);
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/statefulComponent.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/statefulComponent.tsx"); } } })();
/***/ }),
/* 29 */
/***/ (function(module, exports) {
......@@ -660,15 +637,12 @@ class AnotherStatefulComponent extends react_1.Component {
this.decrease = this.decrease.bind(this);
}
increase() {
console.log('increase');
this.props.increment();
}
decrease() {
console.log('decrease');
this.props.sub(1);
}
render() {
console.log('stateful', this.props);
return (React.createElement("div", null,
React.createElement("h3", null, "Another Stateful Component"),
React.createElement("br", null),
......@@ -690,8 +664,6 @@ exports.default = react_redux_1.connect((state) => ({
})(AnotherStatefulComponent);
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/anotherStatefulComponent.tsx"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/components/anotherStatefulComponent.tsx"); } } })();
/***/ }),
/* 31 */
/***/ (function(module, exports, __webpack_require__) {
......@@ -708,8 +680,6 @@ const reducers = redux_1.combineReducers({
exports.store = (initialState) => redux_2.createStore(reducers, initialState);
;(function register() { /* react-hot-loader/webpack */ if (process.env.NODE_ENV !== 'production') { if (typeof __REACT_HOT_LOADER__ === 'undefined') { return; } /* eslint-disable camelcase, no-undef */ var webpackExports = typeof __webpack_exports__ !== 'undefined' ? __webpack_exports__ : module.exports; /* eslint-enable camelcase, no-undef */ if (typeof webpackExports === 'function') { __REACT_HOT_LOADER__.register(webpackExports, 'module.exports', "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/state/index.ts"); return; } /* eslint-disable no-restricted-syntax */ for (var key in webpackExports) { /* eslint-enable no-restricted-syntax */ if (!Object.prototype.hasOwnProperty.call(webpackExports, key)) { continue; } var namedExport = void 0; try { namedExport = webpackExports[key]; } catch (err) { continue; } __REACT_HOT_LOADER__.register(namedExport, key, "/Users/jnsone11/repos/react-workshop/front-end/renderine/src/common/state/index.ts"); } } })();
/***/ }),
/* 32 */
/***/ (function(module, exports) {
......@@ -727,6 +697,7 @@ const UglifyJSPlugin = __webpack_require__(35);
const ExtractTextPlugin = __webpack_require__(36);
const StatsWriterPlugin = __webpack_require__(37).StatsWriterPlugin;
const BundleAnalyzerPlugin = __webpack_require__(38).BundleAnalyzerPlugin;
const CompressionPlugin = __webpack_require__(39)
const IS_PRODUCTION = process.env.NODE_ENV === 'production';
......@@ -748,26 +719,22 @@ let plugins = [
'process.env': {
'NODE_ENV': IS_PRODUCTION ? JSON.stringify('production') : JSON.stringify('develop')
}
}),
/*new webpack
.optimize
.AggressiveMergingPlugin(),
new webpack
.optimize
.OccurrenceOrderPlugin(),
new UglifyJSPlugin(),
new webpack.LoaderOptionsPlugin({minimize: true, debug: false}),
new CompressionPlugin({
})
];
if (IS_PRODUCTION) {
plugins.push(new BundleAnalyzerPlugin({analyzerMode: 'static'}));
plugins.push(new webpack.optimize.AggressiveMergingPlugin());
plugins.push(new webpack.optimize.OccurrenceOrderPlugin());
plugins.push(new UglifyJSPlugin());
plugins.push(new webpack.LoaderOptionsPlugin({minimize: true, debug: false}));
plugins.push(new CompressionPlugin({
asset: "[path].gz[query]",
algorithm: "gzip",
test: /\.(js|html|css)$/,
threshold: 0,
minRatio: 0.8
})*/
];
if (IS_PRODUCTION) {
plugins.push(new BundleAnalyzerPlugin({analyzerMode: 'static'}));
}));
} else {
plugins.push(new webpack.HotModuleReplacementPlugin());
plugins.push(new webpack.NoEmitOnErrorsPlugin());
......@@ -800,7 +767,7 @@ module.exports = {
},
// Enable sourcemaps for debugging webpack's output.
devtool: "inline-source-map",
devtool: IS_PRODUCTION ? "source-map" : "inline-source-map",
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
......@@ -866,6 +833,12 @@ module.exports = require("webpack-bundle-analyzer");
/* 39 */
/***/ (function(module, exports) {
module.exports = require("compression-webpack-plugin");
/***/ }),
/* 40 */
/***/ (function(module, exports) {
module.exports = require("webpack-hot-middleware");
/***/ })
......
......@@ -44,6 +44,15 @@
"@types/node": "9.4.0"
}
},
"@types/compression-webpack-plugin": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/@types/compression-webpack-plugin/-/compression-webpack-plugin-0.4.0.tgz",
"integrity": "sha512-YsKi/VjBo/G+CdyhwxkVxtQgNHiidjN+MK37OxYBnlPXl/hOp1dsIDiIKAM/DSpBQt7yFAlMwtJp7JYOlvk+/A==",
"dev": true,
"requires": {
"@types/webpack": "3.8.4"
}
},
"@types/events": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@types/events/-/events-1.1.0.tgz",
......@@ -162,6 +171,40 @@
"integrity": "sha512-p3yv9sBBJXi3noUG216BpUI7VtVBUAvBIfZNTiDROUY31YBfsFHM4DreS7XMekN8IjtX0ysvCnm6r3WnirnNeA==",
"dev": true
},
"@types/tapable": {
"version": "0.2.4",
"resolved": "https://registry.npmjs.org/@types/tapable/-/tapable-0.2.4.tgz",
"integrity": "sha512-pclMAvhPnXJcJu1ZZ8bQthuUcdDWzDuxDdbSf6l1U6s4fP6EBiZpPsOZYqFOrbqDV97sXGFSsb6AUpiLfv4xIA==",
"dev": true
},
"@types/uglify-js": {
"version": "2.6.30",
"resolved": "https://registry.npmjs.org/@types/uglify-js/-/uglify-js-2.6.30.tgz",
"integrity": "sha512-NjiBNGFl58vHJeijl63w1fWRIjLnrfOvimsXF5b3lTzEzkTV1BnVsbqQeLejg54upsHPWIF63aiub5TEwH619A==",
"dev": true,
"requires": {
"source-map": "0.6.1"
},
"dependencies": {
"source-map": {
"version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
"dev": true
}
}
},
"@types/webpack": {
"version": "3.8.4",
"resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-3.8.4.tgz",
"integrity": "sha512-xZ1XD7he+dji6Gs1L8OuY44uzXnruD7Ron1gpA59sC+M8Zmg97V26uchuBJh1B1NOQA1m4Upc72k8ROtNli0tg==",
"dev": true,
"requires": {
"@types/node": "9.4.0",
"@types/tapable": "0.2.4",
"@types/uglify-js": "2.6.30"
}
},
"@types/webpack-env": {
"version": "1.13.4",
"resolved": "https://registry.npmjs.org/@types/webpack-env/-/webpack-env-1.13.4.tgz",
......@@ -1338,6 +1381,19 @@
"integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=",
"dev": true
},
"compression-webpack-plugin": {
"version": "1.1.6",
"resolved": "https://registry.npmjs.org/compression-webpack-plugin/-/compression-webpack-plugin-1.1.6.tgz",
"integrity": "sha512-oNao3kC1JiQC781akjCgm7zu7K1pxDw9sd2oUUbW128cp2OpvOD4xm1s/WDuAdRsOl4m6rsTGAzcdILvA/7nFg==",
"dev": true,
"requires": {
"async": "2.6.0",
"cacache": "10.0.2",
"find-cache-dir": "1.0.0",
"serialize-javascript": "1.4.0",
"webpack-sources": "1.1.0"
}
},
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
......
......@@ -39,6 +39,7 @@
"whatwg-fetch": "^2.0.3"
},
"devDependencies": {
"@types/compression-webpack-plugin": "^0.4.0",
"@types/express": "^4.11.0",
"@types/node": "^9.4.0",
"@types/node-fetch": "^1.6.7",
......@@ -48,6 +49,7 @@
"@types/webpack-env": "^1.13.4",
"apollo-codegen": "^0.18.3",
"awesome-typescript-loader": "^3.4.1",
"compression-webpack-plugin": "^1.1.6",
"extract-text-webpack-plugin": "^3.0.2",
"react-hot-loader": "^3.1.3",
"source-map-loader": "^0.2.3",
......
......@@ -26,19 +26,15 @@ class AnotherStatefulComponent extends Component<Props> {
}
increase(){
console.log('increase');
this.props.increment();
}
decrease(){
console.log('decrease');
this.props.sub(1);
}
render(){
console.log('stateful',this.props);
return (
<div>
<h3>Another Stateful Component</h3>
......
......@@ -26,12 +26,10 @@ class StatefulComponent extends Component<Props> {
}
increase(){
console.log('increase');
this.props.increment();
}
decrease(){
console.log('decrease');
this.props.sub(1);
}
......
......@@ -26,6 +26,8 @@ if (!IS_PRODUCTION){
}));
server.use(require("webpack-hot-middleware")(compiler));
} else {
server.use('/',express.static('dist/client',{}));
}
server.get('*', (req: express.Request, res: express.Response) => {
......
......@@ -5,6 +5,7 @@ const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const StatsWriterPlugin = require("webpack-stats-plugin").StatsWriterPlugin;
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const CompressionPlugin = require("compression-webpack-plugin")
const IS_PRODUCTION = process.env.NODE_ENV === 'production';
......@@ -26,26 +27,22 @@ let plugins = [
'process.env': {
'NODE_ENV': IS_PRODUCTION ? JSON.stringify('production') : JSON.stringify('develop')
}
}),
/*new webpack
.optimize
.AggressiveMergingPlugin(),
new webpack
.optimize
.OccurrenceOrderPlugin(),
new UglifyJSPlugin(),
new webpack.LoaderOptionsPlugin({minimize: true, debug: false}),
new CompressionPlugin({
})
];
if (IS_PRODUCTION) {
plugins.push(new BundleAnalyzerPlugin({analyzerMode: 'static'}));
plugins.push(new webpack.optimize.AggressiveMergingPlugin());
plugins.push(new webpack.optimize.OccurrenceOrderPlugin());
plugins.push(new UglifyJSPlugin());
plugins.push(new webpack.LoaderOptionsPlugin({minimize: true, debug: false}));
plugins.push(new CompressionPlugin({
asset: "[path].gz[query]",
algorithm: "gzip",
test: /\.(js|html|css)$/,
threshold: 0,
minRatio: 0.8
})*/
];
if (IS_PRODUCTION) {
plugins.push(new BundleAnalyzerPlugin({analyzerMode: 'static'}));
}));
} else {
plugins.push(new webpack.HotModuleReplacementPlugin());
plugins.push(new webpack.NoEmitOnErrorsPlugin());
......@@ -78,7 +75,7 @@ module.exports = {
},
// Enable sourcemaps for debugging webpack's output.
devtool: "inline-source-map",
devtool: IS_PRODUCTION ? "source-map" : "inline-source-map",
resolve: {
// Add '.ts' and '.tsx' as resolvable extensions.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment