From 728a15b34462cb8a19056dec8b37f1ede0ca5b7d Mon Sep 17 00:00:00 2001 From: Fabien Le Frapper Date: Mon, 12 Aug 2024 16:44:31 +0200 Subject: [PATCH] clean before deploy (#111) --- gatsby-config.ts | 10 ++++++++-- package.json | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gatsby-config.ts b/gatsby-config.ts index dff80e1..9d41078 100644 --- a/gatsby-config.ts +++ b/gatsby-config.ts @@ -1,6 +1,9 @@ -require("dotenv").config({ path: `.env` }); +import dotenv from 'dotenv'; +dotenv.config({ path: `.env` }); -module.exports = { +import type { GatsbyConfig } from 'gatsby'; + +const config: GatsbyConfig = { siteMetadata: { title: `Que Faire de mes Déchets ? Découvrez les solutions pour tous vos déchets et nos conseils pour en produire moins.`, author: `Datagir`, @@ -57,3 +60,6 @@ module.exports = { "gatsby-plugin-webpack-bundle-analyser-v2", ], }; + + +export default config diff --git a/package.json b/package.json index c57aaea..aa81107 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "webpack-cli": "^5.1.4" }, "scripts": { - "build": " yarn iframe && gatsby build", + "build": "rm -rf ../cache && yarn cache clean && rm -rf node_modules && yarn install --frozen-lockfile && gatsby clean && yarn iframe && gatsby build", "iframe": "webpack", "develop": "gatsby develop", "format": "prettier --write src/**/*.{js,jsx}",