I'm using microbundle this way:
microbundle build --entry js/mod-processor.js -o dist
It works but generates a file called dist/modplayer-js.js, modplayer-js being the name of my package/directory.
Is there a way to specify the name of the output file?
@warpdesign I think you're supposed to specify the names in the package.json like so: https://github.com/developit/microbundle#specifying-builds-in-packagejson
Sure, but what if I want to build only a single file that's part of my build but isn't the name of the whole package?
How about adding an option to specify the name/prefix of the output file?
@warpdesign I have the same issue. Did you find a solution?
You can currently set the output name as x.js which will make it take the name of the input file
I am wondering the same thing, but can’t figure out how to define these in the package.json file. Are these named output values added to root of package.json, or should they be under another property. The information in the readme is not clear?
If you could please clarify here
https://github.com/developit/microbundle#specifying-builds-in-packagejson
Specifying the filename as part of output commands works to me
❯ npx microbundle build -o dist/index.js --no-compress --no-sourcemap --name "@microlink/react"
Build "@microlink/react" to dist:
15.4 kB: index.js.gz
13.4 kB: index.js.br
15.3 kB: index.mjs.gz
13.4 kB: index.mjs.br
15.5 kB: index.umd.js.gz
13.6 kB: index.umd.js.br
Most helpful comment
You can currently set the output name as x.js which will make it take the name of the input file