Skip to content

Commit 5d966c1

Browse files
committed
Bundle in json files for now
1 parent 9709ca8 commit 5d966c1

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

.config/rollup.base.config.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from 'node:path'
33
import { fileURLToPath } from 'node:url'
44

55
import commonjs from '@rollup/plugin-commonjs'
6+
import json from '@rollup/plugin-json'
67
import replace from '@rollup/plugin-replace'
78
import { nodeResolve } from '@rollup/plugin-node-resolve'
89
import rangesIntersect from 'semver/ranges/intersects.js'
@@ -68,10 +69,11 @@ export default (extendConfig = {}) => {
6869
return true
6970
}
7071
const id = normalizeId(id_)
71-
if (id.endsWith('.cjs') || id.endsWith('.json')) {
72+
if (id.endsWith('.cjs')) {
7273
return true
7374
}
7475
if (
76+
id.endsWith('.json') ||
7577
id.endsWith('.mjs') ||
7678
id.endsWith('.mts') ||
7779
id.endsWith('.ts') ||
@@ -131,6 +133,7 @@ export default (extendConfig = {}) => {
131133
...extendConfig,
132134
plugins: [
133135
customResolver,
136+
json(),
134137
ts({
135138
transpiler: 'babel',
136139
browserslist: false,

package-lock.json

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"@babel/runtime": "^7.25.7",
9393
"@eslint/compat": "^1.2.0",
9494
"@rollup/plugin-commonjs": "^28.0.0",
95+
"@rollup/plugin-json": "^6.1.0",
9596
"@rollup/plugin-node-resolve": "^15.3.0",
9697
"@rollup/plugin-replace": "^6.0.1",
9798
"@rollup/pluginutils": "^5.1.2",

0 commit comments

Comments
 (0)