当我试图在netlify上构建一个gatsby应用程序时,我的错误是由一个名为的第三方模块生成的。这是错误

我已经在gatsby-node.js上实现了一个空加载器:
exports.onCreateWebpackConfig = ({ stage, loaders, actions }) => {
if (stage === "build-html" || stage === "develop-html") {
actions.setWebpackConfig({
module: {
rules: [
{
test: /react-water-wave/,
use: loaders.null(),
},
],
},
})
}
}这就是如何在gatsby-config.js上编写gatsby插件情感的方法。
plugins: [
{resolve: `gatsby-plugin-emotion`,
options: {
// Accepts the following options, all of which are defined by `@emotion/babel-plugin` plugin.
// The values for each key in this example are the defaults the plugin uses.
sourceMap: true,
autoLabel: "always",
labelFormat: `[local]`,
cssPropOptimization: true,
}
}]发布于 2022-03-13 10:42:42
react-water-wave似乎已经停止了,最后一次提交是3年前的事,据报道,在https://github.com/homerchen19/react-water-wave/issues/14和https://github.com/homerchen19/react-water-wave/issues/27中,它与SSR和React版本有一些不兼容之处。
它似乎不适用于大于17的React版本。
尽管如此,尝试玩(降级)与反应核心版本(这可能导致其他错误)或尝试寻找另一种选择。
https://stackoverflow.com/questions/71450128
复制相似问题