mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
ESM: Do not append the .js suffix to imports if it's already there
This commit is contained in:
parent
5330724dff
commit
1134d5e82b
5 changed files with 56 additions and 5 deletions
|
|
@ -272,7 +272,8 @@ function ESM_addImportSuffix(files) {
|
|||
const pos = info.importedFiles[i].pos;
|
||||
const end = info.importedFiles[i].end;
|
||||
|
||||
if (/\.css$/.test(importText)) {
|
||||
if (/(\.css)|(\.js)$/.test(importText)) {
|
||||
// A CSS import or an import already using .js
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue