Skip to content

Commit d517143

Browse files
committed
Comment on the need for workaround
1 parent 8f90edc commit d517143

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

node_package/src/RSCWebpackLoader.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ const RSCWebpackLoader: LoaderDefinition = function RSCWebpackLoader(source, sou
99
// Convert file path to URL format
1010
const fileUrl = pathToFileURL(this.resourcePath).href;
1111

12+
// Workaround for TS transpiling `await import` while we need to keep it.
13+
// See https://github.com/microsoft/TypeScript/issues/43329#issuecomment-1008361973
14+
// If we end up needing it more than once, prefer creating a non-compiled
15+
// `dynamicImport.js` file instead.
1216
// eslint-disable-next-line no-new-func
1317
const { load } = await new Function('return import("react-server-dom-webpack/node-loader")')() as
1418
typeof import('react-server-dom-webpack/node-loader');

0 commit comments

Comments
 (0)