mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-23 01:54:18 -08:00
* Add env variable to set path prefix - When routing traffic to our new URL, the path prefix needs to be blank - adding path prefix to be set by env var to yml files * Update reference to env var in PATH_PREFIX * Update PR message URL with CDN - The actual website will point to the base url CDN
68 lines
1.6 KiB
JavaScript
68 lines
1.6 KiB
JavaScript
require('dotenv').config({
|
|
path: `.env.${process.env.DATA_SOURCE}`,
|
|
});
|
|
|
|
module.exports = {
|
|
siteMetadata: {
|
|
title: 'Justice40',
|
|
image: '/static/favicon.ico',
|
|
},
|
|
pathPrefix: `${process.env.PATH_PREFIX}`,
|
|
plugins: [
|
|
{
|
|
resolve: 'gatsby-plugin-sass',
|
|
options: {
|
|
sassOptions: {
|
|
includePaths: [
|
|
'./node_modules/uswds',
|
|
],
|
|
},
|
|
cssLoaderOptions: {
|
|
modules: {
|
|
exportLocalsConvention: 'camelCaseOnly',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
{
|
|
resolve: 'gatsby-plugin-intl',
|
|
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`
|
|
'**/*.{scss}',
|
|
'**/*.{json}',
|
|
'**/*.{graphql}',
|
|
'**/*.{md}',
|
|
'**/*.{html}',
|
|
'**/*.{yaml,yml}',
|
|
],
|
|
},
|
|
eslint: {
|
|
patterns: '**/*.{js,jsx,ts,tsx}',
|
|
ignorePatterns: ['public', 'node_modules', '*scss.d.ts'],
|
|
failOnError: true,
|
|
customOptions: {
|
|
fix: true,
|
|
cache: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
'gatsby-plugin-react-helmet',
|
|
],
|
|
};
|