Add workaround for vite auto-replacement in docs (#6284)

This commit is contained in:
Nicola Krumschmidt
2021-06-15 16:55:20 +02:00
committed by GitHub
parent f896e08a7c
commit 4f9ae6591e
5 changed files with 6 additions and 1 deletions

View File

@@ -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;

View File

@@ -121,6 +121,7 @@ export default {
nodeResolve(),
commonjs(),
replace({
'process\u200b.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: true,
}),
terser(),

View File

@@ -112,6 +112,7 @@ export default {
nodeResolve(),
commonjs(),
replace({
'process\u200b.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: true,
}),
terser(),

View File

@@ -154,6 +154,7 @@ export default {
nodeResolve(),
commonjs(),
replace({
'process\u200b.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: true,
}),
terser(),

View File

@@ -154,6 +154,7 @@ export default {
nodeResolve(),
commonjs(),
replace({
'process\u200b.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: true,
}),
terser(),