This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
... | |
plugins: [ | |
new webpack.DefinePlugin({ | |
__DEV__: JSON.stringify(process.MY_ENV_VARIABLE) | |
}), | |
] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// generates a single file for your component.js | |
// only when used. | |
// This returns a promise, which needs to be resolved. | |
import('./components/component.js') | |
// creates a chunk for each file inside your components folder | |
// This is called require context (which require.context is used under the hood) | |
// Webpack is smart enough to do that for you! | |
const myComponents = (componentName) => import(`./components/${componentName}.js`) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
// ... | |
output: { | |
futureEmitAssets: true | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eval("/*\n Copyright © 2018 Andrew Powell\n\n This Source Code Form is subject to the terms of the Mozilla Public\n License, v. 2.0. If a copy of the MPL was not distributed with this\n file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n The above copyright notice and this permission notice shall be\n included in all copies or subsantial portions of this Source Code Form.\n*/\nconst { error, refresh, warn } = __webpack_require__(/*! ./log */ \"./node_modules/webpack-plugin-serve/lib/client/log.js\");\n\n// ignore 1008 (HTTP 400 equivalent) and 1011 (HTTP 500 equivalent)\nconst ignoreCodes = [1008, 1011];\nconst maxAttempts = 10;\n\nclass ClientSocket {\n constructor(options, ...args) {\n this.args = args;\n this.attempts = 0;\n this.eventHandlers = [];\n this.options = options;\n this.retrying = false;\n\n this.connect();\n }\n\n addEventListener(...args) {\n this.eventHandlers.push(args);\n this.socket.addEventListener(...args);\n }\n\n connect() {\n if (this.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
{ source: '', | |
chunk: | |
Chunk { | |
id: 'main', | |
ids: [ 'main' ], | |
debugId: 1000, | |
name: 'main', | |
preventIntegration: false, | |
entryModule: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react'; | |
import Loading from './components/Loading'; | |
import { RouteComponentProps } from 'react-router'; | |
interface AsyncRouteProps { | |
loading: Promise<any>; | |
routeProps: RouteComponentProps<any> & { [key: string]: any }; | |
} | |
interface AsyncRouteState { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
register override | |
register override | |
/home/matheus/forks/GrCartuchos/frontend/node_modules/tapable/lib/HookCodeFactory.js:73 | |
instance._x = options.taps.map(t => t.fn); | |
^ | |
TypeError: Cannot read property 'fn' of undefined | |
at instance._x.options.taps.map.t (/home/matheus/forks/GrCartuchos/frontend/node_modules/tapable/lib/HookCodeFactory.js:73:41) | |
at Array.map (<anonymous>) | |
at SyncHookCodeFactory.setup (/home/matheus/forks/GrCartuchos/frontend/node_modules/tapable/lib/HookCodeFactory.js:73:30) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
register { type: 'sync', | |
fn: [Function], | |
name: 'HotModuleReplacementPlugin' } | |
register { type: 'sync', | |
fn: [Function], | |
name: 'HotModuleReplacementPlugin' } | |
call [ Chunk { | |
id: 0, | |
ids: [ 0 ], | |
debugId: 1000, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import Loading from './components/Loading'; | |
class AsyncRoute extends React.PureComponent { | |
constructor(props) { | |
super(props); | |
this.state = { | |
loaded: false | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MUST USE: | |
- IT WOULD BE SENSIBLE/ADVISABLE TO... | |
- THE ODDS ARE (THAT)... (PARA COISAS FORA DO NORMAL) | |
- WHO SHOULD I (VERB) BUT (SOMETHING ELSE) | |
- IF I WERE IN YOUR SHOES ... | |
- I HOPE YOU'LL TAKE THIS IN THE SPIRIT IN WHICH IT IS INTENDED | |
- SWEARS BY | |