Closed Calx-Takeno closed 1 year ago
看下完整错误信息
Must use import to load ES Module: \Nuxt.Web\node_modules\@babel\runtime\helpers\esm\toConsumableArray.js require() of ES modules is not supported. require() of \Nuxt.Web\node_modules\@babel\runtime\helpers\esm\toConsumableArray.js from \Nuxt.Web\node_modules\vue-server-renderer\build.dev.js is an ES module file as it is a .js file whose nearest parent package.json contains "type": "module" which defines all .js files in that package scope as ES modules. Instead rename toConsumableArray.js to end in .cjs, change the requiring code to use import(), or remove "type": "module" from \Nuxt.Web\node_modules\@babel\runtime\helpers\esm\package.json.
好像解决了,plugin需要设置为model:client
已解决
plugins里也做了import单独导入,但是提示
Must use import to load ES Module: \Nuxt.Web\node_modules\@babel\runtime\helpers\esm\toConsumableArray.js require() of ES modules is not supported. require() of