peertube-theme-nctv-dark/peertube-plugin-video-annotation/scripts/esbuild.js
2023-02-07 11:03:01 +01:00

20 lines
499 B
JavaScript

const esbuild = require('esbuild')
const { externalGlobalPlugin } = require('esbuild-plugin-external-global')
for (const file of [ 'embed-client-plugin.js', 'video-edit-client-plugin.js', 'video-watch-client-plugin.js' ]) {
esbuild.build({
entryPoints: [ 'client/' + file ],
bundle: true,
minify: false,
format: 'esm',
outfile: 'dist/' + file,
target: [ 'safari11' ],
plugins: [
externalGlobalPlugin({
'video.js': 'window.videojs'
})
]
})
}