2021-09-07 10:35:11 -07:00
|
|
|
require('dotenv').config({
|
|
|
|
path: `.env.${process.env.DATA_SOURCE}`,
|
|
|
|
});
|
|
|
|
|
2021-05-19 18:19:38 -04:00
|
|
|
module.exports = {
|
|
|
|
siteMetadata: {
|
2021-05-25 16:21:21 -04:00
|
|
|
title: 'Justice40',
|
2021-07-20 10:46:38 -07:00
|
|
|
image: '/static/favicon.ico',
|
2021-05-19 18:19:38 -04:00
|
|
|
},
|
2021-09-17 11:52:27 -07:00
|
|
|
pathPrefix: `${process.env.PATH_PREFIX}`,
|
2021-05-21 13:05:27 -04:00
|
|
|
plugins: [
|
2021-09-27 13:54:10 -07:00
|
|
|
{
|
|
|
|
resolve: `gatsby-plugin-google-analytics`,
|
|
|
|
options: {
|
|
|
|
// The property ID; the tracking code won't be generated without it
|
|
|
|
trackingId: 'UA-33523145-1',
|
|
|
|
|
|
|
|
// Defines where to place the tracking script - `true` in the head and `false` in the body
|
|
|
|
head: false,
|
|
|
|
|
|
|
|
// Setting this parameter is optional
|
|
|
|
anonymize: true,
|
|
|
|
|
|
|
|
// Setting this parameter is also optional
|
|
|
|
respectDNT: true,
|
|
|
|
|
|
|
|
// Avoids sending pageview hits from custom paths
|
|
|
|
// exclude: ['/preview/**', '/do-not-track/me/too/'],
|
|
|
|
|
|
|
|
// Delays sending pageview hits on route update (in milliseconds)
|
|
|
|
pageTransitionDelay: 0,
|
|
|
|
|
|
|
|
// Enables Google Optimize using your container Id
|
|
|
|
// optimizeId: 'YOUR_GOOGLE_OPTIMIZE_TRACKING_ID',
|
|
|
|
// Enables Google Optimize Experiment ID
|
|
|
|
// experimentId: 'YOUR_GOOGLE_EXPERIMENT_ID',
|
|
|
|
// Set Variation ID. 0 for original 1,2,3....
|
|
|
|
// variationId: 'YOUR_GOOGLE_OPTIMIZE_VARIATION_ID',
|
|
|
|
|
|
|
|
// Defers execution of google analytics script after page load
|
|
|
|
defer: false,
|
|
|
|
|
|
|
|
// Any additional optional fields
|
|
|
|
sampleRate: 5,
|
|
|
|
siteSpeedSampleRate: 10,
|
|
|
|
cookieDomain: 'screeningtool.geoplatform.gov',
|
|
|
|
|
|
|
|
// defaults to false
|
|
|
|
enableWebVitalsTracking: true,
|
|
|
|
},
|
|
|
|
},
|
2021-05-21 13:05:27 -04:00
|
|
|
{
|
|
|
|
resolve: 'gatsby-plugin-sass',
|
|
|
|
options: {
|
2021-06-14 11:06:23 -07:00
|
|
|
sassOptions: {
|
|
|
|
includePaths: [
|
|
|
|
'./node_modules/uswds',
|
|
|
|
],
|
|
|
|
},
|
2021-05-21 13:05:27 -04:00
|
|
|
cssLoaderOptions: {
|
|
|
|
modules: {
|
2021-05-25 16:21:21 -04:00
|
|
|
exportLocalsConvention: 'camelCaseOnly',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-05-21 13:05:27 -04:00
|
|
|
},
|
|
|
|
{
|
2021-06-14 11:06:23 -07:00
|
|
|
resolve: 'gatsby-plugin-intl',
|
2021-05-25 16:21:21 -04:00
|
|
|
options: {
|
|
|
|
// language JSON resource path
|
|
|
|
path: `${__dirname}/src/intl`,
|
|
|
|
// supported language
|
|
|
|
languages: [`en`, `es`],
|
|
|
|
// language file path
|
|
|
|
defaultLanguage: `en`,
|
|
|
|
// option to redirect to `/en` when connecting `/`
|
|
|
|
redirect: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
resolve: 'gatsby-plugin-prettier-eslint',
|
|
|
|
options: {
|
|
|
|
prettier: {
|
|
|
|
patterns: [
|
|
|
|
// The pattern "**/*.{js,jsx,ts,tsx}" is
|
|
|
|
// not used because we will rely on `eslint --fix`
|
2021-07-02 12:32:55 -07:00
|
|
|
'**/*.{scss}',
|
|
|
|
'**/*.{json}',
|
2021-05-25 16:21:21 -04:00
|
|
|
'**/*.{graphql}',
|
2021-07-02 12:32:55 -07:00
|
|
|
'**/*.{md}',
|
2021-05-25 16:21:21 -04:00
|
|
|
'**/*.{html}',
|
|
|
|
'**/*.{yaml,yml}',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
eslint: {
|
|
|
|
patterns: '**/*.{js,jsx,ts,tsx}',
|
|
|
|
ignorePatterns: ['public', 'node_modules', '*scss.d.ts'],
|
|
|
|
failOnError: true,
|
|
|
|
customOptions: {
|
|
|
|
fix: true,
|
|
|
|
cache: true,
|
|
|
|
},
|
2021-05-21 13:05:27 -04:00
|
|
|
},
|
2021-05-25 16:21:21 -04:00
|
|
|
},
|
2021-05-21 13:05:27 -04:00
|
|
|
},
|
2021-05-28 17:07:50 -07:00
|
|
|
'gatsby-plugin-react-helmet',
|
2021-05-21 13:05:27 -04:00
|
|
|
],
|
2021-05-19 18:19:38 -04:00
|
|
|
};
|