Skip to content

Commit 178fcf7

Browse files
Merge pull request #86 from bitlogic/SBIT-474
Sbit 474 - agregado gatsby-plugin-purgecss
2 parents e8d8b3a + ac461ad commit 178fcf7

File tree

4 files changed

+12366
-1
lines changed

4 files changed

+12366
-1
lines changed

gatsby-config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
require("dotenv").config({
2+
path: `.env`, // Asegúrate de que apunte al archivo correcto
3+
});
4+
15
module.exports = {
26
trailingSlash: "always",
37
siteMetadata: {
@@ -163,6 +167,13 @@ module.exports = {
163167
],
164168
},
165169
},
170+
{
171+
resolve: `gatsby-plugin-purgecss`,
172+
options: {
173+
printRejected: true, // Muestra las clases eliminadas en la consola
174+
develop: false, // PurgeCSS solo se ejecuta en producción
175+
},
176+
},
166177
"gatsby-plugin-offline",
167178
`gatsby-plugin-sass`,
168179
],

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"gatsby-plugin-image": "^2.6.0",
2020
"gatsby-plugin-manifest": "^4.6.0",
2121
"gatsby-plugin-offline": "^5.6.0",
22+
"gatsby-plugin-purgecss": "^6.2.1",
2223
"gatsby-plugin-robots-txt": "1.7.1",
2324
"gatsby-plugin-sass": "^5.6.0",
2425
"gatsby-plugin-sharp": "^4.6.0",

src/components/videoBackground/VideoBackground.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ const VideoBackground = ({ data }) => {
116116
const [isIntersecting, setIsIntersecting] = useState(false)
117117
const videoRef = useRef(null)
118118

119-
120119
const pausePlay = () => {
121120
if (isVideoPause) {
122121
videoRef?.current?.play()

0 commit comments

Comments
 (0)