How to replace constant string using define? #1275
-
Repo: https://stackblitz.com/edit/vuepress-cjroce?file=docs/guide/README.md The following configuration is not working... Docs: https://v2.vuepress.vuejs.org/reference/plugin-api.html#define import { defaultTheme, defineUserConfig, viteBundler } from 'vuepress';
export default defineUserConfig({
base: '/',
title: 'VuePress Starter',
description: 'VuePress Starter Project in Stackblitz',
define: {
'%GLOBAL_TEXT%': 'World',
},
plugins: [
{
name: 'my-replace',
define: {
'%GLOBAL_TEXT%': 'World',
},
},
],
bundler: viteBundler({
// vite bundler options here
}),
theme: defaultTheme({
// default theme options here
}),
}); |
Beta Was this translation helpful? Give feedback.
Answered by
Mister-Hope
Mar 2, 2023
Replies: 1 comment
-
Locked as duplicate of #1164. Please add further discussion there if you have questions. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
Mister-Hope
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Locked as duplicate of #1164. Please add further discussion there if you have questions.