Skip to content

Instantly share code, notes, and snippets.

Avatar
🐳
💧

二刺螈 lisonge

🐳
💧
View GitHub Profile
@lisonge
lisonge / test.ts
Created February 11, 2023 13:27
replace specified node in json
View test.ts
import MagicString from 'magic-string';
import * as acorn from 'acorn';
const prefix = `const x=`;
const code = `${prefix}{
"pages": ["pages/index/index"],
"subpackages": [
{
"name": "A",
"pages": ["innerModule/pages/index/index"]