mirror of https://github.com/YunYouJun/valaxy
fix: do not exclude node_modules components
This commit is contained in:
parent
55717ff3ee
commit
b26c6487c6
|
@ -37,9 +37,12 @@ This also means that you can cover one component of the theme to achieve customi
|
|||
import { defineValaxyConfig } from 'valaxy'
|
||||
|
||||
export default defineValaxyConfig({
|
||||
// @see https://github.com/unplugin/unplugin-vue-components#configuration
|
||||
/**
|
||||
* @see https://github.com/unplugin/unplugin-vue-components#configuration
|
||||
* `/[\\/]node_modules[\\/]/, ` 不要排除 node_modules/valaxy/client/components 下的组件
|
||||
*/
|
||||
components: {
|
||||
exclude: [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.exclude[\\/]/],
|
||||
exclude: [/[\\/]\.git[\\/]/, /[\\/]\.exclude[\\/]/],
|
||||
},
|
||||
})
|
||||
```
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
"e2e": "playwright test",
|
||||
"e2e:ui": "playwright test --ui",
|
||||
"e2e:report": "playwright show-report",
|
||||
"link:dev": "pnpm -C packages/valaxy link --global",
|
||||
"lint": "eslint .",
|
||||
"stylelint": "stylelint --fix \"**/*.{scss,vue}\"",
|
||||
"preinstall": "npx only-allow pnpm",
|
||||
|
|
|
@ -40,7 +40,7 @@ export function injectPageDataCode(pageData: PageData) {
|
|||
}
|
||||
|
||||
export function createTransformMarkdown(options: ResolvedValaxyOptions) {
|
||||
const loaderVuePath = path.resolve(options.clientRoot, 'templates/loader.vue')
|
||||
const loaderVuePath = path.resolve(options.clientRoot, 'templates', 'loader.vue')
|
||||
const loaderVue = fs.readFileSync(loaderVuePath, 'utf-8')
|
||||
|
||||
return (code: string, id: string, pageData: PageData) => {
|
||||
|
|
|
@ -74,8 +74,9 @@ export async function ViteValaxyPlugins(
|
|||
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
||||
/**
|
||||
* 默认排除 components/.exclude
|
||||
* `/[\\/]node_modules[\\/]/, ` 不要排除 node_modules/valaxy/client/components 下的组件
|
||||
*/
|
||||
exclude: [/[\\/]node_modules[\\/]/, /[\\/]\.git[\\/]/, /[\\/]\.exclude[\\/]/],
|
||||
exclude: [/[\\/]\.git[\\/]/, /[\\/]\.exclude[\\/]/],
|
||||
|
||||
// allow override
|
||||
allowOverrides: true,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "valaxy",
|
||||
"type": "module",
|
||||
"version": "0.22.1",
|
||||
"version": "0.22.2-beta.5",
|
||||
"description": "📄 Vite & Vue powered static blog generator.",
|
||||
"author": {
|
||||
"email": "me@yunyoujun.cn",
|
||||
|
|
Loading…
Reference in New Issue