-
Notifications
You must be signed in to change notification settings - Fork 381
Open
Labels
💉 bugSomething isn't workingSomething isn't working
Description
版本信息
System:
OS: macOS 14.5
Shell: 5.9 - /bin/zsh
npmPackages:
@modern-js/app-tools: 2.63.2 => 2.63.2
@modern-js/plugin-polyfill: 2.63.2 => 2.63.2
@modern-js/plugin-router-v5: 2.63.2 => 2.63.2
@modern-js/plugin-ssg: 2.63.2 => 2.63.2
@modern-js/plugin-tailwindcss: 2.63.2 => 2.63.2
@modern-js/runtime: 2.63.2 => 2.63.2
@modern-js/tsconfig: 2.63.2 => 2.63.2
问题详情
脚手架默认创建的新项目,使用如下配置
import { appTools } from "@modern-js/app-tools";
import { tailwindcssPlugin } from "@modern-js/plugin-tailwindcss";
import { ssgPlugin } from '@modern-js/plugin-ssg';
// https://modernjs.dev/en/configure/app/usage
module.exports = {
dev: {
writeToDisk: false,
},
output: {
ssg: true,
},
runtime: {
router: true,
},
plugins: [
appTools({
bundler: "rspack", // Set to 'webpack' to enable webpack
}),
tailwindcssPlugin(),
ssgPlugin(),
],
};
未使用 polyfillPlugin,执行 pnpm modern deploy && node .output/index.js
打开 http://localhost:8080/__polyfill__
页面会陷入无休止的重载,console 提示 The initial URL / and the URL /__polyfill__ to be hydrated do not match, reload.
复现链接
npx @modern-js/create@latest myapp
复现步骤
pnpm modern deploy && node .output/index.js
Metadata
Metadata
Assignees
Labels
💉 bugSomething isn't workingSomething isn't working