Skip to content

Instantly share code, notes, and snippets.

@a-s-o
a-s-o / webpack.config.js
Created August 18, 2016 21:51
Move lodash chunks into a specified entry file if it is used in more than one module
new webpack.optimize.CommonsChunkPlugin({
name: 'someEntryFile',
minChunks (module, count) {
return module.resource && module.resource.indexOf('lodash') !== -1 && count > 1;
}
});
@a-s-o
a-s-o / App.tsx
Last active December 15, 2017 15:06
ReactXP Navigator does not re-render the previous card after a navigation event (i.e. navigator.pop()) https://github.com/Microsoft/reactxp/issues/387
import * as RX from 'reactxp'
import Navigator, { Types, NavigatorDelegateSelector as DelegateSelector } from 'reactxp-navigation'
import { EventEmitter } from 'events'
const exampleStore = new EventEmitter()
export class App extends RX.Component<{}, { counter: number }> {
state = { counter: 0 }
private navigator: Navigator