You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Docusaurus config \`future.experimental_faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on.
1159
+
If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: \`{future: {v4: true}}\`"
1160
+
`);
1161
+
});
1162
+
1163
+
it('rejects faster - true (v4: undefined)',()=>{
1164
+
expect(()=>
1165
+
normalizeConfig({
1166
+
future: {
1167
+
v4: false,
1168
+
experimental_faster: true,
1169
+
},
1170
+
}),
1171
+
).toThrowErrorMatchingInlineSnapshot(`
1172
+
"Docusaurus config \`future.experimental_faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on.
1173
+
If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: \`{future: {v4: true}}\`"
"Docusaurus config \`future.experimental_faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on.
1659
+
If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: \`{future: {v4: true}}\`"
1660
+
`);
1661
+
});
1662
+
1663
+
it('rejects - true (v4: undefined)',()=>{
1664
+
constfaster: Partial<FasterConfig>={
1665
+
ssgWorkerThreads: true,
1666
+
};
1667
+
expect(()=>
1668
+
normalizeConfig({
1669
+
future: {
1670
+
v4: undefined,
1671
+
experimental_faster: faster,
1672
+
},
1673
+
}),
1674
+
).toThrowErrorMatchingInlineSnapshot(`
1675
+
"Docusaurus config \`future.experimental_faster.ssgWorkerThreads\` requires the future flag \`future.v4.removeLegacyPostBuildHeadAttribute\` to be turned on.
1676
+
If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: \`{future: {v4: true}}\`"
If you use Docusaurus Faster, we recommend that you also activate Docusaurus v4 future flags: ${logger.code(
468
+
'{future: {v4: true}}',
469
+
)}`,
470
+
);
471
+
}
472
+
}
473
+
448
474
// TODO move to @docusaurus/utils-validation
449
475
exportfunctionvalidateConfig(
450
476
config: unknown,
@@ -476,7 +502,9 @@ export function validateConfig(
476
502
? `${formattedError}These field(s) (${unknownFields}) are not recognized in ${siteConfigPath}.\nIf you still want these fields to be in your configuration, put them in the "customFields" field.\nSee https://docusaurus.io/docs/api/docusaurus-config/#customfields`
0 commit comments