Skip to content

Commit

Permalink
fix: page-setup paths forymls
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonmarcello committed Jan 18, 2024
1 parent 2eee318 commit aa7f1d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wethegit/corgi",
"version": "3.0.11",
"version": "3.0.12",
"description": "Command line interface for use with the corgi framework.",
"main": "bin/index.js",
"bin": {
Expand Down
8 changes: 4 additions & 4 deletions cli/templates/project/src/utilities/page-setup/page-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ export async function setupProps(ctx, pageName) {
if (pageName) {
try {
pageLocales = await import(
/* webpackMode: "eager" */ `../locales/${pageName}/${locale}.yml`
/* webpackMode: "eager" */ `../../locales/${pageName}/${locale}.yml`
).then((m) => m.default)
} catch (err) {
console.error(` ${locale} locales file for ${pageName} not found.`)
}

try {
pageIndexLocales = await import(
/* webpackMode: "eager" */ `../locales/${pageName}/index.yml`
/* webpackMode: "eager" */ `../../locales/${pageName}/index.yml`
).then((m) => m.default)
} catch (err) {
// no problem if there isn't an index file
Expand All @@ -68,15 +68,15 @@ export async function setupProps(ctx, pageName) {

try {
globalLocales = await import(
/* webpackMode: "eager" */ `../locales/globals/${locale}.yml`
/* webpackMode: "eager" */ `../../locales/globals/${locale}.yml`
).then((m) => m.default)
} catch (err) {
console.error(`Global locales file for ${locale} not found.`)
}

try {
globalIndexLocale = await import(
/* webpackMode: "eager" */ `../locales/globals/index.yml`
/* webpackMode: "eager" */ `../../locales/globals/index.yml`
).then((m) => m.default)
} catch (_) {
// no problem if there isn't an index file
Expand Down

0 comments on commit aa7f1d4

Please sign in to comment.