Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,11 @@ async function _renderUniversal(
localeDirectory,
);

const route = options.route;
let html: string = await renderWorker.run({
serverBundlePath,
document: indexHtml,
url: options.route,
url: route?.[0] === '/' ? route : '/' + route,
Comment thread
alan-agius4 marked this conversation as resolved.
});

// Overwrite the client index file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import type { ObjectPattern } from 'copy-webpack-plugin';
import { createHash } from 'node:crypto';
import { createRequire } from 'node:module';
import * as path from 'node:path';
import { globSync } from 'tinyglobby';
import type { Configuration, WebpackOptionsNormalized } from 'webpack';
Expand Down Expand Up @@ -314,7 +315,8 @@ export function getStatsOptions(verbose = false): WebpackStatsOptions {
*/
export function isPackageInstalled(root: string, name: string): boolean {
try {
require.resolve(name, { paths: [root] });
const resolve = createRequire(root + '/').resolve;
Comment thread
alan-agius4 marked this conversation as resolved.
resolve(name);

return true;
} catch {
Expand Down
Loading