mirror of
https://github.com/strapi/strapi.git
synced 2025-09-25 16:29:34 +00:00
fix: use find-root because otherwise node resolutions are used and can fail
This commit is contained in:
parent
1c8b34c3fa
commit
73b2f95cf0
@ -72,6 +72,7 @@
|
||||
"esbuild-loader": "^2.20.0",
|
||||
"execa": "^1.0.0",
|
||||
"fast-deep-equal": "3.1.3",
|
||||
"find-root": "1.1.0",
|
||||
"font-awesome": "^4.7.0",
|
||||
"fork-ts-checker-webpack-plugin": "7.2.1",
|
||||
"formik": "^2.2.6",
|
||||
|
@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const path = require('path');
|
||||
const findRoot = require('find-root');
|
||||
|
||||
const aliasExactMatch = [
|
||||
'@strapi/design-system',
|
||||
@ -40,7 +41,7 @@ const aliasExactMatch = [
|
||||
// See https://webpack.js.org/configuration/resolve/
|
||||
module.exports = {
|
||||
...aliasExactMatch.reduce((acc, moduleName) => {
|
||||
acc[`${moduleName}$`] = path.dirname(require.resolve(`${moduleName}/package.json`));
|
||||
acc[`${moduleName}$`] = findRoot(require.resolve(moduleName));
|
||||
return acc;
|
||||
}, {}),
|
||||
|
||||
|
@ -11984,7 +11984,7 @@ find-cache-dir@^3.3.1:
|
||||
make-dir "^3.0.2"
|
||||
pkg-dir "^4.1.0"
|
||||
|
||||
find-root@^1.1.0:
|
||||
find-root@1.1.0, find-root@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/find-root/-/find-root-1.1.0.tgz#abcfc8ba76f708c42a97b3d685b7e9450bfb9ce4"
|
||||
integrity sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==
|
||||
|
Loading…
x
Reference in New Issue
Block a user