Skip to content

Instantly share code, notes, and snippets.

// "brfs": "^1.4.3",
// "webworkify-webpack": "^1.1.8",
// "transform-loader": "^0.2.3",
module.exports = {
module: {
noParse: /node_modules\/mapbox-gl\/dist\/mapbox-gl.js/,
loaders: [
{
test: /mapbox-gl.+\.js$/,
query: 'brfs',
@aleksplus
aleksplus / gist:a0a86600e32eaea574e7
Created January 9, 2016 23:06
Cropping an image client-side using the Canvas
// From README of: https://github.com/DominicTobias/react-image-crop
loadImage: function(src, callback) {
var image = new Image();
image.onload = function(e) {
callback(image);
image = null;
};
image.src = src;