File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change 11// This build script must be executed from the root repo directory via
22// ```
3- // yarn build
3+ // npm run build
44// ```
55
66// - TypeScript -----------------------------------------------------------
@@ -24,18 +24,22 @@ build({
2424// - Sass -----------------------------------------------------------
2525
2626import autoprefixer from "autoprefixer" ;
27- import sassPlugin from "esbuild-plugin-sass" ;
28- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
29- // @ts -ignore; Type definitions are not found. This occurs when `strict: true` in tsconfig.json
30- import postCssPlugin from "@deanc/esbuild-plugin-postcss" ;
27+ import { sassPlugin } from "esbuild-sass-plugin" ;
28+ import postcss from "postcss" ;
29+ import postcssPresetEnv from "postcss-preset-env" ;
3130
3231const sassOpts = {
3332 minify : true ,
3433 banner : banner ,
3534 plugins : [
36- sassPlugin ( ) ,
37- postCssPlugin ( {
38- plugins : [ autoprefixer ] ,
35+ sassPlugin ( {
36+ async transform ( source , resolveDir ) {
37+ const { css } = await postcss ( [
38+ autoprefixer ,
39+ postcssPresetEnv ( { stage : 0 } ) ,
40+ ] ) . process ( source , { from : undefined } ) ;
41+ return css ;
42+ } ,
3943 } ) ,
4044 ] ,
4145} ;
You can’t perform that action at this time.
0 commit comments