Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Feb 17, 2020
1 parent 0210c6e commit a0657cc
Showing 1 changed file with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions README.md
Expand Up @@ -36,26 +36,43 @@ You can read more about these settings and others [over on the Autoprefixer page

Autoprefixer doesn't play well with `.css.map` files, but it will work with embedded source maps. This means there are two options.

If you want to disable CSS sourcemaps from ember-cli-sass update `ember-cli-build.js` to
If you want to disable CSS sourcemaps from ember-cli-sass update `ember-cli-build.js` to

```js
sassOptions: {
// This tells ember-cli-sass to avoid generating the sourcemap file (like vendor.css.map)
sourceMap: false
},
sassOptions: {
// This tells ember-cli-sass to avoid generating the sourcemap file (like vendor.css.map)
sourceMap: false
}
```

Alternatively, you may use embedded source maps. So we tell `ember-cli-sass` to embed the sourcemaps and then turn on sourcemaps with autoprefixer which will update the embedded sourcemap after adding prefixes.

```js
sassOptions: {
sourceMapEmbed: true
},
autoprefixer: {
enabled: true,
cascade: true,
sourcemap: true
}
sassOptions: {
sourceMapEmbed: true
},
autoprefixer: {
enabled: true,
cascade: true,
sourcemap: true
}
```

Also note you can optionally disable in production!

```js
const envIsProduction = (process.env.EMBER_ENV === 'production');

...

sassOptions: {
sourceMapEmbed: !envIsProduction
},
autoprefixer: {
enabled: true,
cascade: true,
sourcemap: !envIsProduction
}
```

## References
Expand Down

0 comments on commit a0657cc

Please sign in to comment.