fix: cli generate platform issue (#859)
1. 修复生成的平台模板仍然使用 useResourceAlias 配置的 bug 2. 修复生成的 package.json 未格式化的 bug
This commit is contained in:
parent
a50825514e
commit
0e8dc1faaa
|
|
@ -46,7 +46,7 @@ export function createPlatform(name, options = {}) {
|
|||
const pkgContent = generatePackageJson(name, mergedOptions, templatePath)
|
||||
|
||||
fs.outputFileSync(path.resolve(destPath, 'engine.config.js'), configContent)
|
||||
fs.outputJSONSync(path.resolve(destPath, 'package.json'), pkgContent)
|
||||
fs.outputJSONSync(path.resolve(destPath, 'package.json'), pkgContent, { spaces: 2 })
|
||||
|
||||
logger.log(
|
||||
chalk.green(`create finish, run the follow command to start project: \ncd ${name} && npm install && npm run dev`)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ export default defineConfig((configEnv) => {
|
|||
viteConfigEnv: configEnv,
|
||||
root: __dirname,
|
||||
iconDirs: [path.resolve(__dirname, './node_modules/@opentiny/tiny-engine/assets/')],
|
||||
useSourceAlias: true,
|
||||
envDir: './env'
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue