Skip to content

how to enable the css autoprefix function in webpack.dev.config and webpack.prod.config #431

Closed
@mytxzz

Description

@mytxzz

how to enable the css autoprefix function in webpack.dev.config and webpack.prod.config?

I try to add the following to the vue-loader.conf.js file

module.exports = {
  loaders: utils.cssLoaders({
    sourceMap: isProduction
      ? config.build.productionSourceMap
      : config.dev.cssSourceMap,
    extract: isProduction
  }),
  postcss: [
     require('postcss-cssnext')({
       browsers: ['last 20 versions']
     })
   ]
}

my pakage.json file :

   "webpack": "^2.2.1",
   "postcss-cssnext": "^2.10.0",
   "postcss-loader": "^1.3.3",

when I exec the npm run dev ,no autoprefix in the flex and transform css attrs

thank you very much if anyone can help me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions