Skip to content

Commit 85b1e09

Browse files
jaylinskiyyx990803
authored andcommitted
Don't include files from node_modules (#16)
If vuepress is run in the root of a node package (eg. `vuepress build .`), it would include all markdown files from the `node_modules` folder, which breaks the build process.
1 parent 641519d commit 85b1e09

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/prepare.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ async function resolveOptions (sourceDir) {
9999
? path.resolve(siteConfig.dest)
100100
: path.resolve(sourceDir, '.vuepress/dist'),
101101
publicPath: base,
102-
pageFiles: sort(await globby(['**/*.md', '!.vuepress'], { cwd: sourceDir })),
102+
pageFiles: sort(await globby(['**/*.md', '!.vuepress', '!node_modules'], { cwd: sourceDir })),
103103
pagesData: null,
104104
themePath: null,
105105
notFoundPath: null,

0 commit comments

Comments
 (0)