我在ReactNext.Adding中使用openlayers库,在npm中使用openlayers库。但是当我导入"import Map from 'ol / Map'“库时,我得到了以下错误。 import PluggableMap from '.__ (<path>\.next\server\static\development\pages\index.js:23:31)
at Module.._ &
我使用两个库(react-image-crop和react-responsive-carousel),每个库都需要一个css导入。我在next.config.js中添加了css加载器,当页面最初加载时,一切都很好。但是,当在页面上调用刷新时,会出现document is not defined错误。此外,当我运行yarn build时,构建会按预期进行编译,然后在最后使用Reference Erro
我在Nextjs中对组件使用。当我延迟加载具有CSS模块的组件时,我会得到错误CSS Modules cannot be imported from within node_modules.。如果我不使用CSS模块,代码将正确执行。它将延迟加载动态组件。只有当我将文件添加到项目中时。
如果我硬编码它编译的导入路径。只有在使用模板文字字符串时才会出现此问题。import React from 'r