fix(manifest): 修改manifest.js文件生成位置,从.nuxt移动至public目录下
This commit is contained in:
parent
3ee3a5cf77
commit
68e6b11e99
@ -23,7 +23,7 @@ export default defineNuxtModule({
|
|||||||
|
|
||||||
const remoteEntry = `remoteEntry_${pkg.version}.js`;
|
const remoteEntry = `remoteEntry_${pkg.version}.js`;
|
||||||
|
|
||||||
const outPath = path.join(process.cwd(), ".nuxt/generated/manifest.js"); // 固定目录
|
const outPath = path.join(nuxt.options.rootDir, "public/generated/manifest.js");
|
||||||
|
|
||||||
fs.mkdirSync(path.dirname(outPath), { recursive: true });
|
fs.mkdirSync(path.dirname(outPath), { recursive: true });
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
|
@ -82,7 +82,7 @@ export default defineNuxtConfig({
|
|||||||
let manifest;
|
let manifest;
|
||||||
try {
|
try {
|
||||||
// Nuxt buildDir 是 .nuxt
|
// Nuxt buildDir 是 .nuxt
|
||||||
const manifestPath = join(process.cwd(), ".nuxt/generated/manifest.js");
|
const manifestPath = join(process.cwd(), "public/generated/manifest.js");
|
||||||
|
|
||||||
// 检查文件是否存在
|
// 检查文件是否存在
|
||||||
await fs.access(manifestPath);
|
await fs.access(manifestPath);
|
||||||
|
@ -17,7 +17,7 @@ export default defineEventHandler(async (event) => {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Nuxt buildDir 是 .nuxt
|
// Nuxt buildDir 是 .nuxt
|
||||||
const manifestPath = join(process.cwd(), ".nuxt/generated/manifest.js");
|
const manifestPath = join(process.cwd(), "public/generated/manifest.js");
|
||||||
|
|
||||||
// 检查文件是否存在
|
// 检查文件是否存在
|
||||||
await fs.access(manifestPath);
|
await fs.access(manifestPath);
|
||||||
|
Loading…
Reference in New Issue
Block a user