Skip to content

Imported CSS files do not update on save #8

Closed
@gavinmcfarland

Description

@gavinmcfarland

You might be already aware of this, but when using postcss-import and making changes to files which are imported they do not update on the server after they are saved or after reloading the browser.

<!-- component.html -->
<div class="test"></div>
<style>
    @import `colors.css`; /* .test { color: red } */
    .test {
       color: blue;
    }
</style>
// webpack.config.js
//...
const preprocess = require('svelte-preprocess');
//...
const options = {
    transformers: {
        postcss: {
            plugins: [
                require('postcss-import'),
                require('autoprefixer')({ browsers: 'last 2 versions' })
            ]
       }
    }
}
//...
options: {
    css: true,
    generate: "ssr",
    dev,
    preprocess: preprocess(options)
}

I'm not sure if this is related to svelte-preprocess, svelte-loader, or postcss-import.

Any thoughts?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions