【问题标题】:gatsby-plugin-transition-link AniLink not working on buildgatsby-plugin-transition-link AniLink 无法构建
【发布时间】:2019-10-16 21:48:20
【问题描述】:

我的 AniLink 转换在我的本地机器上使用 gatsby developgatsby serve 工作正常。 但是使用 gatsby build,并放在我的服务器上,我只会得到一个没有动画的页面更改。

单击滑块中的图像应该有过渡油漆滴落,但它只会改变页面。

这里是一个测试站点http://www.lukedohner.com/bootstrap-ld/react-site/public/

我需要做些什么来为 gatsby 构建引入这个吗?

AniLink from "gatsby-plugin-transition-link/AniLink"

/滑块组件

<AniLink className={`swipermy-slide-link-ani`}  paintDrip to="/redemption" duration={1} hex="#ffffff"></AniLink>

/gatsby-config.js

    plugins: [

        `gatsby-plugin-react-helmet`,
        {
          resolve: `gatsby-source-filesystem`,
          options: {
            name: `images`,
            path: `${__dirname}/src/images`,
          },
        },
        `gatsby-plugin-transition-link`,

        `gatsby-transformer-sharp`,
        `gatsby-plugin-sharp`,
        {
          resolve: `gatsby-plugin-manifest`,
          options: {
            name: `gatsby-starter-default`,
            short_name: `starter`,
            start_url: `/`,
            background_color: `#663399`,
            theme_color: `#663399`,
            display: `minimal-ui`,
            icon: `src/images/gatsby-icon.png`, // This path is relative to the root of the site.
          },
        },


        // this (optional) plugin enables Progressive Web App + Offline functionality
        // To learn more, visit: https://gatsby.app/offline
        // 'gatsby-plugin-offline',
      ],

【问题讨论】:

    标签: reactjs gatsby


    【解决方案1】:

    我有类似的东西,它只在某些页面上工作。问题出在特定页面 json 404ing 上。

    检查你的控制台,如果页面上有任何错误,它可能会阻止处理转换的 js 运行

    【讨论】:

      猜你喜欢
      • 2019-09-23
      • 2021-06-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-01
      • 2020-02-03
      • 1970-01-01
      相关资源
      最近更新 更多