Skip to content

Commit

Permalink
Use IIFE format for the CDN build. Fixes #33
Browse files Browse the repository at this point in the history
  • Loading branch information
iniznet authored Dec 13, 2023
1 parent 131a704 commit bcae301
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/async-alpine.script.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async function build(src, opts) {
entryPoints: [ `./src/${ src }` ],
bundle: true,
outfile: `./dist/${ name }`,
format: opts.format || 'esm',
format: opts.format || 'iife',
minify: opts.minify ?? true,
target: [ 'es2019' ],
});
Expand All @@ -18,7 +18,7 @@ async function build(src, opts) {
async function buildAll() {
return Promise.all([
build('script.js', { name: 'script' }),
build('module.js', { name: 'esm', minify: false }),
build('module.js', { name: 'esm', format: 'esm', minify: false }),
build('module.js', { name: 'cjs', format: 'cjs', minify: false })
]);
}
Expand Down

0 comments on commit bcae301

Please sign in to comment.