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

Writing to response changes the path #119

Open
AxelMontini opened this issue Feb 15, 2019 · 1 comment
Open

Writing to response changes the path #119

AxelMontini opened this issue Feb 15, 2019 · 1 comment

Comments

@AxelMontini
Copy link

I'm using these settings (version 0.11.0)

app.use(
    sassMiddleware({
      src: path.resolve(path.join(__dirname, '..', 'assets', 'sass')),
      dest: path.resolve(path.join(__dirname, '..', 'public', 'css')),
      debug: false,
      indentedSyntax: true,
      force: false,
      response: false,
    })
);

And my compiled CSS is available under the path /css/style.css.

When I change response to true, I get a 404 error and instead my CSS becomes available at /style.css.

Path change when modifying this option is not documented anywhere, so it is indeed unwanted.

File structure:

├── assets
│   └── sass
│       └── style.sass
├── package.json
├── package-lock.json
└── src
    ├── ...
    └── server.js
@fschoenfeldt
Copy link

fschoenfeldt commented Apr 18, 2019

I do have this aswell. I come around this by deactivating compiling on live server, then linking only compiled css. While in develop, I force compilation and then link two styles in my <head>

compiled css after "first" request
<link rel="stylesheet" href="/custom.css">
actual compiled css
<link rel="stylesheet" href="/static/compiled/custom.css">

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

No branches or pull requests

2 participants