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 @@ -167,9 +167,7 @@ export function resolveError(

function resolveEntry(opts: NormalizedPluginOptions, sourceFile: RouteSourceFile) {
const pathname = getPathnameFromDirPath(opts, sourceFile.dirPath);

const entryTextIndex = pathname.lastIndexOf('/entry');
const chunkFileName = pathname.slice(1, entryTextIndex) + '.js';
const chunkFileName = pathname.slice(1);

const buildEntry: BuildEntry = {
id: createFileId(opts.routesDir, sourceFile.filePath),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function generateQwikCityEntries(ctx: BuildContext) {
c.push(`\n/** Qwik City Entries (${ctx.entries.length}) */`);
for (let i = 0; i < ctx.entries.length; i++) {
const entry = ctx.entries[i];
c.push(`export const _${i} = () => import(${JSON.stringify(entry.filePath)});`);
c.push(`export const ${entry.id} = () => import(${JSON.stringify(entry.filePath)});`);

Check warning

Code scanning / CodeQL

Improper code sanitization

[Improperly sanitized value](1) flows to here and is used to construct code.
}

return c.join('\n') + '\n';
Expand Down