Last active
July 4, 2016 11:14
-
-
Save chlab/fe7b8b4116fe79121035107be7e8b2ad to your computer and use it in GitHub Desktop.
This file contains 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
// in webpack.config.js | |
module: { | |
loaders: [ | |
{ | |
test: require.resolve('blueimp-bootstrap-image-gallery/js/bootstrap-image-gallery'), | |
loader: 'imports?define=>false,blueimp=blueimp-gallery' | |
}, | |
{ | |
test: require.resolve('blueimp-gallery'), | |
loader: 'imports?define=>false' | |
} | |
] | |
} | |
// in your module | |
import 'blueimp-bootstrap-image-gallery/js/bootstrap-image-gallery.js'; | |
import blueimp from 'exports?window.blueimp!blueimp-gallery' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overrides blueimp-image-gallery's relative requiring by telling it not to do amd and just export itself as
blueimp
.See stackoverflow question.
You will need to
npm install imports-loader exports-loader --save