Skip to content

Commit

Permalink
Skipping lodash from bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
unional committed Jan 13, 2017
1 parent 6cbb124 commit fead01a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
16 changes: 16 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>global-store demo</title>
</head>

<body>
<!--Scripts are added inside body to ensoure sequential loading-->
<!--TODO add additional scripts needed to run the code-->
<script src="node_modules/lodash/lodash.min.js"></script>
<script src="dist/color-map.js"></script>
</body>

</html>
4 changes: 1 addition & 3 deletions dist/color-map.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/color-map.js.map

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion rollup.config.global.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,18 @@ export default {
external: [
'lodash'
],
globals: {
'lodash': '_'
},
format: 'iife',
moduleId: pkg.name,
moduleName,
plugins: [
sourcemaps(),
nodeResolve({ jsnext: true }),
nodeResolve({
jsnext: true,
skip: ['lodash']
}),
nodeGlobals(),
nodeBuiltins(),
commonjs(),
Expand Down

0 comments on commit fead01a

Please sign in to comment.