Skip to content

Commit e83406b

Browse files
committed
add umd wrapper
1 parent 5795d71 commit e83406b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

esbuild-config.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
var glsl = require('esbuild-plugin-glsl').glsl;
22
var environmentPlugin = require('esbuild-plugin-environment').environmentPlugin;
3+
var umdWrapper = require('esbuild-plugin-umd-wrapper').umdWrapper;
34

45
module.exports = {
56
entryPoints: ['./lib/index.js'],
6-
format: 'iife',
7+
format: 'cjs',
78
globalName: 'Plotly',
89
bundle: true,
910
minify: false,
@@ -15,6 +16,9 @@ module.exports = {
1516
environmentPlugin({
1617
NODE_DEBUG: false,
1718
}),
19+
umdWrapper({
20+
libraryName: 'Plotly'
21+
})
1822
],
1923
alias: {
2024
stream: 'stream-browserify',

0 commit comments

Comments
 (0)