Skip to content

Commit 84644d5

Browse files
committed
Merge branch '61-vite' into 6.2
2 parents 3d62472 + 58689c9 commit 84644d5

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

vite.config.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,13 @@ function ckeditorTranslations() {
3535

3636
// Determine available languages from the first directory.
3737
const languages = (await readdir(translationDirs[0]))
38-
.filter((f) => f.endsWith(".js") && !f.endsWith(".umd.js") && !f.endsWith(".d.ts") && f !== "en.js")
38+
.filter(
39+
(f) =>
40+
f.endsWith(".js") &&
41+
!f.endsWith(".umd.js") &&
42+
!f.endsWith(".d.ts") &&
43+
f !== "en.js",
44+
)
3945
.map((f) => f.replace(".js", ""));
4046

4147
await mkdir(targetDir, { recursive: true });
@@ -57,13 +63,17 @@ function ckeditorTranslations() {
5763

5864
// Extract the dictionary entries from:
5965
// export default {"lang":{"dictionary":{...},getPluralForm(n){...}}}
60-
const dictMatch = source.match(/"dictionary":\{(.+?)\},getPluralForm/);
66+
const dictMatch = source.match(
67+
/"dictionary":\{(.+?)\},getPluralForm/,
68+
);
6169
if (dictMatch) {
6270
dictionaries.push(dictMatch[1]);
6371
}
6472

6573
if (getPluralForm === null) {
66-
const pluralMatch = source.match(/getPluralForm(\([^)]*\)\{.+?\})/);
74+
const pluralMatch = source.match(
75+
/getPluralForm(\([^)]*\)\{.+?\})/,
76+
);
6777
if (pluralMatch) {
6878
getPluralForm = pluralMatch[1];
6979
}
@@ -93,5 +103,8 @@ export default defineConfig({
93103
name: "ckeditor5",
94104
},
95105
},
106+
define: {
107+
define: "undefined",
108+
},
96109
plugins: [ckeditorTranslations()],
97110
});

0 commit comments

Comments
 (0)