mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-02-22 17:44:20 -08:00
Integrate gatsby-plugin-intl for internationalization Replaces static text with `intl.formatMessage` call and Links with `gatsby-plugin-intl` equivalent Note: `npm install` now requires `--force` to install the latest `gatsby-plugin-intl` as it doesn't explicitly support gatsby3.0
40 lines
1,022 B
JavaScript
40 lines
1,022 B
JavaScript
module.exports = {
|
|
/*
|
|
This is to workaround the following error when building locally:
|
|
Warning: React.createElement: type is invalid -- expected a string
|
|
(for built-in components) or a class/function (for composite components) but got: undefined.
|
|
at IndexPage
|
|
We will need to fix this before running `gatsby build`
|
|
*/
|
|
flags: {
|
|
DEV_SSR: false
|
|
},
|
|
siteMetadata: {
|
|
title: "Justice40",
|
|
},
|
|
plugins: [
|
|
{
|
|
resolve: 'gatsby-plugin-sass',
|
|
options: {
|
|
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,
|
|
},
|
|
},
|
|
],
|
|
};
|