@vuepress/core 2.0.0-rc.11 → 2.0.0-rc.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +9 -12
  2. package/package.json +5 -5
package/dist/index.js CHANGED
@@ -1,11 +1,13 @@
1
1
  // src/app/prepare/prepareClientConfigs.ts
2
2
  var prepareClientConfigs = async (app) => {
3
3
  const clientConfigFiles = await app.pluginApi.hooks.clientConfigFile.process(app);
4
- const content = `${clientConfigFiles.map((filePath, index) => `import clientConfig${index} from '${filePath}'`).join("\n")}
4
+ const content = `${clientConfigFiles.map(
5
+ (filePath, index) => `import * as clientConfig${index} from '${filePath}'`
6
+ ).join("\n")}
5
7
 
6
8
  export const clientConfigs = [
7
9
  ${clientConfigFiles.map((_, index) => ` clientConfig${index},`).join("\n")}
8
- ]
10
+ ].map((m) => m.default).filter(Boolean)
9
11
  `;
10
12
  await app.writeTemp("internal/clientConfigs.js", content);
11
13
  };
@@ -75,17 +77,12 @@ if (import.meta.hot) {
75
77
  `;
76
78
  var resolvePageRedirects = ({ path: path9, pathInferred }) => {
77
79
  const redirectsSet = /* @__PURE__ */ new Set();
78
- const addRedirect = (redirect) => {
79
- const normalizedPath = normalizeRoutePath(redirect);
80
- if (normalizedPath === path9)
81
- return;
82
- const encodedPath = encodeURI(normalizedPath);
83
- if (encodedPath === path9)
84
- return;
85
- redirectsSet.add(redirect);
86
- };
87
80
  if (pathInferred !== null) {
88
- addRedirect(encodeURI(pathInferred));
81
+ const normalizedPathInferred = normalizeRoutePath(pathInferred);
82
+ const encodedPathInferred = encodeURI(normalizedPathInferred);
83
+ if (normalizedPathInferred !== path9 && encodedPathInferred !== path9) {
84
+ redirectsSet.add(encodedPathInferred);
85
+ }
89
86
  }
90
87
  return Array.from(redirectsSet);
91
88
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vuepress/core",
3
- "version": "2.0.0-rc.11",
3
+ "version": "2.0.0-rc.13",
4
4
  "description": "Core package of VuePress",
5
5
  "keywords": [
6
6
  "vuepress",
@@ -28,10 +28,10 @@
28
28
  ],
29
29
  "dependencies": {
30
30
  "vue": "^3.4.27",
31
- "@vuepress/client": "2.0.0-rc.11",
32
- "@vuepress/markdown": "2.0.0-rc.11",
33
- "@vuepress/shared": "2.0.0-rc.11",
34
- "@vuepress/utils": "2.0.0-rc.11"
31
+ "@vuepress/shared": "2.0.0-rc.13",
32
+ "@vuepress/client": "2.0.0-rc.13",
33
+ "@vuepress/markdown": "2.0.0-rc.13",
34
+ "@vuepress/utils": "2.0.0-rc.13"
35
35
  },
36
36
  "publishConfig": {
37
37
  "access": "public"