node-sass-middleware icon indicating copy to clipboard operation
node-sass-middleware copied to clipboard

Pre-existing files in the destination assumes there is a source file for it

Open 2JJ1 opened this issue 5 years ago • 1 comments
trafficstars

My code:

app.use(sassMiddleware({
	src: path.join(__dirname, 'sass'),
	dest: path.join(__dirname, 'static'),
	debug: true,
	outputStyle: 'compressed',
	force: true,
	prefix: '/assets/css'
}));

Output:

source: ...project\sass\reset.scss dest: ...project\static\reset.css read: ...project\sass\reset.scss skip: ...project\sass\reset.scss does not exist

I don't have a file named "reset.scss" in /sass/reset.css. How ever, I do already have a file named "reset.css" in /static/assets/css. For some reason, if there's a pre-existing file in the destination directory, it seems to assume there's a source file with a similar directory. I don't like this functionality. Is there an option to disable it? I have css files in the destination path that did not come from the middleware.

2JJ1 avatar Nov 28 '19 16:11 2JJ1

Couple of questions:

  • what is the URL in request?
  • what is the expected behavior?
  • what is the actual behavior?

please provide a runable example and steps to reproduce the undesired behavior (preferably a git repo or a zip file preserving the directory structure).

am11 avatar Nov 28 '19 17:11 am11