mirror of
https://github.com/directus/directus.git
synced 2026-01-23 06:28:20 -05:00
Add workaround for vite auto-replacement in docs (#6284)
This commit is contained in:
committed by
GitHub
parent
f896e08a7c
commit
4f9ae6591e
@@ -102,7 +102,8 @@ export default defineComponent({
|
||||
|
||||
pageClass.value = attributes?.pageClass;
|
||||
|
||||
const htmlString = md.render(markdown);
|
||||
// Un-escape zero-width characters to allow breaking up character sequences automatically replaced by vite
|
||||
const htmlString = md.render(markdown).replaceAll('\\u200b', '\u200b');
|
||||
|
||||
html.value = htmlString;
|
||||
|
||||
|
||||
@@ -121,6 +121,7 @@ export default {
|
||||
nodeResolve(),
|
||||
commonjs(),
|
||||
replace({
|
||||
'process\u200b.env.NODE_ENV': JSON.stringify('production'),
|
||||
preventAssignment: true,
|
||||
}),
|
||||
terser(),
|
||||
|
||||
@@ -112,6 +112,7 @@ export default {
|
||||
nodeResolve(),
|
||||
commonjs(),
|
||||
replace({
|
||||
'process\u200b.env.NODE_ENV': JSON.stringify('production'),
|
||||
preventAssignment: true,
|
||||
}),
|
||||
terser(),
|
||||
|
||||
@@ -154,6 +154,7 @@ export default {
|
||||
nodeResolve(),
|
||||
commonjs(),
|
||||
replace({
|
||||
'process\u200b.env.NODE_ENV': JSON.stringify('production'),
|
||||
preventAssignment: true,
|
||||
}),
|
||||
terser(),
|
||||
|
||||
@@ -154,6 +154,7 @@ export default {
|
||||
nodeResolve(),
|
||||
commonjs(),
|
||||
replace({
|
||||
'process\u200b.env.NODE_ENV': JSON.stringify('production'),
|
||||
preventAssignment: true,
|
||||
}),
|
||||
terser(),
|
||||
|
||||
Reference in New Issue
Block a user