mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-05-09 20:27:30 +08:00
fix: 全局移除process.client、process.server #669
This commit is contained in:
@@ -4,7 +4,7 @@ import '~/assets/toast.css'
|
||||
|
||||
export default defineNuxtPlugin(async (nuxtApp) => {
|
||||
// 确保只在客户端环境中注册插件
|
||||
if (process.client) {
|
||||
if (import.meta.client) {
|
||||
try {
|
||||
// 使用动态导入来避免 CommonJS 模块问题
|
||||
const { default: Toast, POSITION } = await import('vue-toastification')
|
||||
|
||||
Reference in New Issue
Block a user