Skip to content

Commit d76d668

Browse files
committed
fix not being able to import .json files
1 parent 34f0749 commit d76d668

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/processScript/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ export async function processScript(code: string, {
252252
const bundle = await rollup({
253253
input: filePathResolved,
254254
plugins: [
255+
rollupPluginJSON({ preferConst: true }),
255256
{
256257
name: `hackmud-script-manager`,
257258
async transform(code, id) {
@@ -288,8 +289,7 @@ export async function processScript(code: string, {
288289
extensions
289290
}),
290291
rollupPluginCommonJS(),
291-
rollupPluginNodeResolve({ extensions }),
292-
rollupPluginJSON()
292+
rollupPluginNodeResolve({ extensions })
293293
],
294294
treeshake: { moduleSideEffects: false }
295295
})

0 commit comments

Comments
 (0)