How do I use postcss/autoprefixer in angular

后端 未结 1 1462
一整个雨季
一整个雨季 2021-01-06 17:28

I have read through the issue #1521

on how to use postcss/autoprefixer I am still really unlcear.

Do I just npm install autoprefixer --save-dev

相关标签:
1条回答
  • 2021-01-06 18:12

    I have installed the *postcss postcss-cli autoprefixer as dev dependencies

    npm install --save-dev postcss postcss-cli autoprefixer
    

    And then create a npm script inisde the package.json file to run the postcss cli and auto prefixer like so

    "script": {
      ...
       "prefixcss": "postcss -u autoprefixer --autoprefixer.browsers 'last 2 versions' -r src/**/*.css",
      ...
    }
    

    And then ran the script before I rebuilt

     npm run prefixcss
    
    0 讨论(0)
提交回复
热议问题