Bundle files in ESM (#13266)
This commit is contained in:
1 parent
77ac062120
commit
16c9d8bafe
5 files changed
+51
-9
No files matched your search
@@ -7,7 +7,12 @@ function getPrettierInternal() {
|
||||
return import(entry).then((module) => module.default);
|
||||
}
|
||||
|
||||
const entry = pathToFileURL(path.join(process.env.PRETTIER_DIR, "index.js"));
|
||||
const entry = pathToFileURL(
|
||||
path.join(
|
||||
process.env.PRETTIER_DIR,
|
||||
process.env.NODE_ENV === "production" ? "index.mjs" : "index.js"
|
||||
)
|
||||
);
|
||||
return import(entry);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user