We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can unbuild build code in IIFE format?
I configured it like below but it didn't work as expected.
import { defineBuildConfig } from 'unbuild' export default defineBuildConfig({ entries: [ 'src/index', ], clean: true, declaration: true, rollup: { output: { name: 'Gtool', format: 'iife' } } })
The text was updated successfully, but these errors were encountered:
Maybe just rename your bundle name, I guess?
import { renameSync } from 'fs' import { resolve } from 'path' import { defineBuildConfig } from 'unbuild' export default defineBuildConfig({ entries: [ 'src/index', ], clean: true, rollup: { output: { name: 'Gtool', format: 'iife', }, }, hooks: { 'build:done': function ({ options }) { renameSync(resolve(options.outDir, 'index.mjs'), resolve(options.outDir, 'index.js')) }, }, })
Sorry, something went wrong.
Haha, thank you. I didn't even look at the built files
rollup.output.format
iife
No branches or pull requests
Describe the feature
Can unbuild build code in IIFE format?
I configured it like below but it didn't work as expected.
Additional information
The text was updated successfully, but these errors were encountered: