mirror of
https://github.com/kremalicious/portfolio.git
synced 2024-11-16 01:55:15 +01:00
add intersection-observer polyfill
This commit is contained in:
parent
a394a1fe14
commit
116db3adf2
@ -14,6 +14,16 @@ exports.modifyWebpackConfig = ({ config, stage }) => {
|
|||||||
return config
|
return config
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// https://github.com/gatsbyjs/gatsby/issues/2288#issuecomment-334467821
|
||||||
|
exports.modifyWebpackConfig = ({ config, stage }) => {
|
||||||
|
if (stage === 'build-html') {
|
||||||
|
config.loader('null', {
|
||||||
|
test: /intersection-observer/,
|
||||||
|
loader: 'null-loader',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
exports.createPages = ({ boundActionCreators, graphql }) => {
|
exports.createPages = ({ boundActionCreators, graphql }) => {
|
||||||
const { createPage } = boundActionCreators
|
const { createPage } = boundActionCreators
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
"gatsby-source-filesystem": "^1.5.35",
|
"gatsby-source-filesystem": "^1.5.35",
|
||||||
"gatsby-transformer-json": "^1.0.17",
|
"gatsby-transformer-json": "^1.0.17",
|
||||||
"gatsby-transformer-sharp": "^1.6.24",
|
"gatsby-transformer-sharp": "^1.6.24",
|
||||||
|
"intersection-observer": "^0.5.0",
|
||||||
"react-helmet": "^5.2.0",
|
"react-helmet": "^5.2.0",
|
||||||
"react-markdown": "^3.3.0",
|
"react-markdown": "^3.3.0",
|
||||||
"react-transition-group": "^2.3.1"
|
"react-transition-group": "^2.3.1"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import Img from 'gatsby-image'
|
import Img from 'gatsby-image'
|
||||||
|
import 'intersection-observer'
|
||||||
import './ProjectImage.scss'
|
import './ProjectImage.scss'
|
||||||
|
|
||||||
const ProjectImage = ({ sizes, alt }) => (
|
const ProjectImage = ({ sizes, alt }) => (
|
||||||
|
Loading…
Reference in New Issue
Block a user