Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vue 3: Fix undefined relativeIncludesDir and relativeLayoutsDir properties #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions EleventyVue.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,19 +154,19 @@ class EleventyVue {
this.ignores = new Set();

// These need to be forced to forward slashes for comparison
let relativeIncludesDir = this.rawIncludesDir ? EleventyVue.forceForwardSlashOnFilePath(addLeadingDotSlash(path.join(this.relativeInputDir, this.rawIncludesDir))) : undefined;
let relativeLayoutsDir = this.rawLayoutsDir ? EleventyVue.forceForwardSlashOnFilePath(addLeadingDotSlash(path.join(this.relativeInputDir, this.rawLayoutsDir))) : undefined;
this.relativeIncludesDir = this.rawIncludesDir ? EleventyVue.forceForwardSlashOnFilePath(addLeadingDotSlash(path.join(this.relativeInputDir, this.rawIncludesDir))) : undefined;
this.relativeLayoutsDir = this.rawLayoutsDir ? EleventyVue.forceForwardSlashOnFilePath(addLeadingDotSlash(path.join(this.relativeInputDir, this.rawLayoutsDir))) : undefined;

// don’t add ignores that match includes or layouts dirs
for(let ignore of extraIgnores) {
if(relativeIncludesDir && ignore.startsWith(relativeIncludesDir)) {
if(this.relativeIncludesDir && ignore.startsWith(this.relativeIncludesDir)) {
// do nothing
debug( "Skipping ignore from eleventy.ignores event: %o, matched includes dir", ignore);
} else if(relativeLayoutsDir && ignore.startsWith(relativeLayoutsDir)) {
} else if(this.relativeLayoutsDir && ignore.startsWith(this.relativeLayoutsDir)) {
// do nothing
debug( "Skipping ignore from eleventy.ignores event: %o, matched layouts dir", ignore);
} else {
debug( "Adding ignore from eleventy.ignores event: %o %O %O", ignore, { relativeIncludesDir }, { relativeLayoutsDir } );
debug( "Adding ignore from eleventy.ignores event: %o %O %O", ignore, { relativeIncludesDir: this.relativeIncludesDir }, { relativeLayoutsDir: this.relativeLayoutsDir } );
this.ignores.add(ignore);
}
}
Expand Down