Skip to content
Permalink
Browse files

Used externals in webpack to fix issues with global variables

  • Loading branch information...
hmtinc committed Dec 5, 2017
1 parent 2c407e2 commit 27b4cb36e98e7b9df2f933a1642c700058f93a26
Showing with 9 additions and 1 deletion.
  1. +1 −0 demo.html
  2. +8 −1 webpack.config.js
@@ -11,6 +11,7 @@
<!-- for testing with local version of cytoscape.js -->
<!--<script src="../cytoscape.js/build/cytoscape.js"></script>-->

<script src="https://unpkg.com/popper.js"></script>
<script src="cytoscape-popper.js"></script>


@@ -22,7 +22,14 @@ let config = {
{ test: /\.js$/, exclude: /node_modules/, use: 'babel-loader' }
]
},
externals: PROD ? Object.keys( pkg.dependencies || {} ) : [],
externals: {
"popper.js" : {
commonjs: "popper.js",
commonjs2: "popper.js",
amd: "popper.js",
root: "Popper"
}
},
plugins: MIN ? [
new webpack.optimize.UglifyJsPlugin({
compress: {

0 comments on commit 27b4cb3

Please sign in to comment.
You can’t perform that action at this time.