Switching from Gulp to Webpack

后端 未结 5 2116
轻奢々
轻奢々 2020-12-31 07:08

UPDATE 30.04.20

[ Moving to Webpack ]

My first question is about how recommended is this switch for simple projects, just to Pre-Process/Con

5条回答
  •  耶瑟儿~
    2020-12-31 07:49

    I don't think you'd need postcss loader. I mean, for the time being. You are just moving from one to tool to another, so you should just keeping as lean as possible.

    { 
      test: /(\.css|\.scss)$/, 
      include: path.join(__dirname, 'src'), 
      loaders: ['style-loader', 'css-loader', 'sass-loader'] 
    }
    

    Mind that include inside my code depends on your configuration. After that I would consider to get rid of the 'relative' path you have in gulp. It could break your things if you'd want to maintain a development and production environment. Just personal experience.

提交回复
热议问题