Skip to content

Commit

Permalink
🐛 Fix AMD bundle (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wil Wilsman authored Apr 5, 2021
1 parent 1e600c7 commit 85a612c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const plugins = {
`(function() {\n${indent(bundle[file].code)}}).call(window);\n`,
// support amd & commonjs modules by referencing the global
'if (typeof define === "function" && define.amd) {',
` define(["${pkg.name}"], () => window.${options.name});`,
` define([], () => window.${options.name});`,
'} else if (typeof module === "object" && module.exports) {',
` module.exports = window.${options.name};`,
'}\n'
Expand Down

0 comments on commit 85a612c

Please sign in to comment.