Bundler
Bundler copied to clipboard
Does not understand .mjs extension / script type
My index.html file has a script like <script type="module" src="./main.mjs"></script>
Bundler crashes because it can't find a createAsset plugin despite (1) mjs being a fairly common extension for JavaScript module files (2) the type="module" tag, which should identify this as Javascript.
deno run -A --unstable https://deno.land/x/bundler/cli.ts bundle index.html
Entry index.html
Error: No createAsset plugin found: 'main.mjs'
at Bundler.createAsset (https://deno.land/x/[email protected]/bundler.ts:175:11)
at async Bundler.createGraph (https://deno.land/x/[email protected]/bundler.ts:251:17)
at async Bundler.bundle (https://deno.land/x/[email protected]/bundler.ts:621:19)
at async bundleFunction (https://deno.land/x/[email protected]/cli.ts:38:41)
at async Command.bundleCommand [as fn] (https://deno.land/x/[email protected]/cli.ts:88:3)
multiple extensions are now supported and should be processed correctly with the next release.