2025-04-04 07:27:58 +11:00
|
|
|
// See: https://rollupjs.org/introduction/
|
2025-07-24 19:11:15 +10:00
|
|
|
import {builtinModules} from 'node:module'
|
2025-04-04 07:27:58 +11:00
|
|
|
import commonjs from '@rollup/plugin-commonjs'
|
|
|
|
|
import nodeResolve from '@rollup/plugin-node-resolve'
|
|
|
|
|
import typescript from '@rollup/plugin-typescript'
|
2025-07-15 23:23:39 +00:00
|
|
|
import json from '@rollup/plugin-json'
|
2025-04-04 07:27:58 +11:00
|
|
|
|
|
|
|
|
const config = {
|
|
|
|
|
input: 'src/index.ts',
|
|
|
|
|
output: {
|
|
|
|
|
esModule: true,
|
|
|
|
|
file: 'dist/index.js',
|
|
|
|
|
format: 'es',
|
2025-07-24 19:11:15 +10:00
|
|
|
sourcemap: true,
|
2025-04-04 07:27:58 +11:00
|
|
|
},
|
2025-07-16 07:30:35 +00:00
|
|
|
external: [...builtinModules, /^node:/],
|
2025-07-15 23:23:39 +00:00
|
|
|
plugins: [
|
|
|
|
|
typescript(),
|
2025-07-16 07:12:45 +00:00
|
|
|
nodeResolve({
|
|
|
|
|
preferBuiltins: true,
|
|
|
|
|
browser: false,
|
2025-07-24 19:11:15 +10:00
|
|
|
exportConditions: ['node'],
|
2025-07-16 07:12:45 +00:00
|
|
|
}),
|
|
|
|
|
commonjs({
|
2025-07-24 19:11:15 +10:00
|
|
|
include: /node_modules/,
|
2025-07-16 07:12:45 +00:00
|
|
|
}),
|
2025-07-24 19:11:15 +10:00
|
|
|
json(),
|
|
|
|
|
],
|
2025-04-04 07:27:58 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default config
|