Skip to content

How best to handle SASS compilation? #3

@chrisjsewell

Description

@chrisjsewell

So I was trying to get this to work with rollup, and there are a number of plugins to do it.
But I couldn't work out how to simply compile it to its own folder:

  • to get it to be compiled in the first place, you needed to import it into the index.ts, which we don't want anyway, but also causes issues with the typescript declarations (who try to reference the file)
  • we build multiple outputs but only want the sass to compile once

Currently using directly sass --style=compressed --source-map --embed-sources src/style/index.sass dist/css/style.min.css this works generally fine as a standalone compiler, however: it would be noce to integrate it with rollup, and also add postcss transforms, in particular in https://github.com/postcss/autoprefixer.

Note in 90a6e94, I added autoprefixer to the css compile, and it seems to work. I was a bit worried it would mess up the source map, but that also appears to be properly handled 😄

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions