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

Passthrough copy serve conflicts with #3537

Open
bye-csavier opened this issue Nov 16, 2024 · 0 comments
Open

Passthrough copy serve conflicts with #3537

bye-csavier opened this issue Nov 16, 2024 · 0 comments

Comments

@bye-csavier
Copy link

bye-csavier commented Nov 16, 2024

Operating system

Windows 10 22H2

Eleventy

v3.0.0

Describe the bug

I premise that I don't know if this is a globbing limitation or an issue.
Sadly, It looks like adding src/res/**/*.js as a pass through copy prevents also src/res/scss/*.scss to be compiled.

Reproduction steps

  1. Setup 11ty as follows:
import * as sass from 'sass';

export default async function(config){

    config.setInputDirectory("src");
    config.setOutputDirectory("dist");

    config.addWatchTarget("src/**/*");

    config.setQuietMode(true);

    config.addPassthroughCopy("src/assets");
    config.addPassthroughCopy("src/**/*.html");
	config.addPassthroughCopy("src/res/**/*.js");

	config.addTemplateFormats("scss");
	config.addExtension("scss", {
		outputFileExtension:"css",
		compile: async function (inputContent, inputPath) {
			let result = sass.compileString(inputContent, {style: "compressed"});
			this.addDependencies(inputPath, result.loadedUrls);
			return async () => {
				return result.css;
			};
		},
	});

};
  1. Run npx @11ty/eleventy --serve --port=8080

  2. Modify any scss file inside src/res/style/

Expected behavior

I wanted to have my SCSS file located at src/res/scss/*.scss to be compiled while watching src/**/* and having src/res/**/*.js as a pass through copy.
Is there a way to prevent this behavior?
I know using src/res/js/**/*.js would work for me, but it's an approximate solution.

Reproduction URL

No response

Screenshots

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant