Skip to content

Commit

Permalink
📦 build(rollup): expose __filename to global
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannchie committed Sep 13, 2023
1 parent 0269b2a commit eef1929
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export default {
output: {
file: 'lib/index.js',
format: 'es',
banner: '#!/usr/bin/env node',
banner: `#!/usr/bin/env node
import { fileURLToPath } from 'url'
global['__filename'] = fileURLToPath(import.meta.url)`,
inlineDynamicImports: true,
},
plugins: [
Expand Down

0 comments on commit eef1929

Please sign in to comment.