Skip to content

Commit

Permalink
align the explanations
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Aug 25, 2022
1 parent 013a1c8 commit 5f07b9b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .changeset/views-do-change.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'@keystone-6/core': major
---

Changes field `.views` module resolution, from a path, to a module that will be resolved from your project's package directory
Changes field `.views` module resolution, from a path, to a module path that can be resolved at the project's root directory
4 changes: 2 additions & 2 deletions packages/core/src/admin-ui/system/createAdminMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ export function createAdminMeta(
function assertValidView(view: string, location: string) {
if (view.includes('\\')) {
throw new Error(
`${location} contains a backslash, which is not allowed. If you're using require.resolve or etc. remove the usage of it and provide a relative path from the root of the project instead.`
`${location} contains a backslash, which is invalid. You need to use a module path that can be resolved at the project's root directory (see https://github.com/keystonejs/keystone/pull/7805)`
);
}

if (path.isAbsolute(view)) {
throw new Error(
`${location} is an absolute path, which is not allowed, provide a path relative to the root of the project instead.`
`${location} is an absolute path, which is invalid. You need to use a module path that can be resolved at the project's root directory (see https://github.com/keystonejs/keystone/pull/7805)`
);
}
}

0 comments on commit 5f07b9b

Please sign in to comment.