提交 da1d0bd7 编写于 作者: fxy060608's avatar fxy060608

fix: preprocess pages.json

上级 e6e37beb
...@@ -2,7 +2,6 @@ import fs from 'fs' ...@@ -2,7 +2,6 @@ import fs from 'fs'
import path from 'path' import path from 'path'
import slash from 'slash' import slash from 'slash'
import { Plugin, ResolvedConfig } from 'vite' import { Plugin, ResolvedConfig } from 'vite'
import { parse } from 'jsonc-parser'
import { camelize, capitalize } from '@vue/shared' import { camelize, capitalize } from '@vue/shared'
import { import {
H5_FRAMEWORK_STYLE_PATH, H5_FRAMEWORK_STYLE_PATH,
...@@ -42,7 +41,7 @@ export function uniPagesJsonPlugin( ...@@ -42,7 +41,7 @@ export function uniPagesJsonPlugin(
}, },
load(id) { load(id) {
if (id.endsWith(PAGES_JSON_JS)) { if (id.endsWith(PAGES_JSON_JS)) {
return JSON.stringify(parse(fs.readFileSync(pagesJsonPath, 'utf8'))) return fs.readFileSync(pagesJsonPath, 'utf8')
} }
}, },
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册