cli
没有webpack/vite的时候,cli能帮到你
shell
npm i merak-compilenpm i merak-compile创建文件 merak.config.json(可以通过merak init创建)
json
{
"$schema": "https://unpkg.com/merak-compile/assets/schema.json",
"dir": ".",
"globals": [],
"fakeGlobalVar": "vanilla",
"exclude": ["node_modules/**/*", "dist/**/*"],
"format": "esm",
"logPath": "./name.md",
"isinLine": true
}{
"$schema": "https://unpkg.com/merak-compile/assets/schema.json",
"dir": ".",
"globals": [],
"fakeGlobalVar": "vanilla",
"exclude": ["node_modules/**/*", "dist/**/*"],
"format": "esm",
"logPath": "./name.md",
"isinLine": true
}配置项和vite/webpack中一致
通过
shell
npx meraknpx merak就可以将文件进行编译
天璇