Skip to content

Commit

Permalink
refactor: convert gatsby-config to ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
bradenmacdonald committed Dec 16, 2024
1 parent 48aa670 commit 60e534c
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions www/gatsby-config.js → www/gatsby-config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
require('dotenv').config({
path: `.env.${process.env.NODE_ENV}`,
});
const rehypeSlugPlugin = require('rehype-slug');
const rehypeAutolinkHeadingsPlugin = require('rehype-autolink-headings');
import { dirname } from 'path';
import { fileURLToPath } from 'url';
import dotenv from 'dotenv';
dotenv.config({ path: `.env.${process.env.NODE_ENV}` });
import rehypeSlugPlugin from 'rehype-slug';
import rehypeAutolinkHeadingsPlugin from 'rehype-autolink-headings';

const __dirname = dirname(fileURLToPath(import.meta.url));

const segmentPlugin = {
resolve: 'gatsby-plugin-segment-js',
Expand Down Expand Up @@ -113,7 +116,7 @@ if (process.env && process.env.FEATURE_ENABLE_AXE) {
plugins.push(axePlugin);
}

module.exports = {
export default {
siteMetadata: {
title: 'Paragon Design System',
description: 'Technical documentation for the Paragon Design System.',
Expand Down

0 comments on commit 60e534c

Please sign in to comment.