Skip to content

Commit 2b86008

Browse files
committed
Simplify rollup config
1 parent 219f93b commit 2b86008

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

rollup.config.mjs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
// @ts-check
21
import { createRequire, builtinModules } from 'node:module'
32
import path from 'node:path'
3+
import { defineConfig } from 'rollup'
44
import nodeResolve from '@rollup/plugin-node-resolve'
55
import commonjs from '@rollup/plugin-commonjs'
66
import typescript from 'rollup-plugin-ts'
7-
import { defineConfig } from 'rollup'
87

98
/** @type { import('./package.json') } */
109
const pkg = createRequire(import.meta.url)('./package.json')
@@ -30,11 +29,6 @@ function packageType() {
3029

3130
/** @type { import('rollup').OutputOptions } */
3231
const sharedOutputOptions = {
33-
generatedCode: {
34-
preset: 'es2015',
35-
symbols: false,
36-
},
37-
freeze: false,
3832
sourcemap: true,
3933
plugins: [
4034
packageType()
@@ -47,8 +41,12 @@ export default defineConfig({
4741
{
4842
format: 'commonjs',
4943
file: pkg.exports.require,
50-
interop: id => id && (id.startsWith('node:') || builtins.has(id)) ? 'default' : 'auto',
44+
generatedCode: {
45+
preset: 'es2015',
46+
symbols: false,
47+
},
5148
esModule: false,
49+
freeze: false,
5250
exports: 'named',
5351
...sharedOutputOptions,
5452

0 commit comments

Comments
 (0)