diff --git a/app/preact/src/server/framework-preset-preact.ts b/app/preact/src/server/framework-preset-preact.ts index 7a3ae2e4656..9b445f1459d 100644 --- a/app/preact/src/server/framework-preset-preact.ts +++ b/app/preact/src/server/framework-preset-preact.ts @@ -17,12 +17,11 @@ export function webpackFinal(config: Configuration) { ...config, resolve: { ...config.resolve, - modules: [path.resolve('node_modules'), ...config.resolve.modules], alias: { ...config.resolve.alias, - react: require.resolve('preact/compat'), - 'react-dom/test-utils': require.resolve('preact/test-utils'), - 'react-dom': require.resolve('preact/compat'), + react: path.dirname(require.resolve('preact/compat/package.json')), + 'react-dom/test-utils': path.dirname(require.resolve('preact/test-utils/package.json')), + 'react-dom': path.dirname(require.resolve('preact/compat/package.json')), }, }, };