Skip to content

Commit 0696794

Browse files
committed
add/clarify comments in prefix loader files
1 parent 41f6348 commit 0696794

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

packages/nextjs/src/config/loaders/prefixLoader.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ function prefixLoader(this: LoaderThis, userCode: string): string {
2222
const { distDir } = this.getOptions ? this.getOptions() : this.query!;
2323

2424
const templatePath = path.resolve(__dirname, '../templates/prefixLoaderTemplate.js');
25+
// make sure the template is included when runing `webpack watch`
2526
this.addDependency(templatePath);
2627

2728
// Fill in the placeholder
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
22
(global as any).__rewriteFramesDistDir__ = '__DIST_DIR__';
33

4-
// We need this to make this file an ESM module, which TS requires when using `isolatedModules`.
4+
// We need this to make this file an ESM module, which TS requires when using `isolatedModules`, but it doesn't affect
5+
// the end result - Rollup recognizes that it's a no-op and doesn't include it when building our code.
56
export {};

0 commit comments

Comments
 (0)