How to configure webpack to use compass in my project

后端 未结 3 1976
忘了有多久
忘了有多久 2021-02-19 23:24

I\'m new in webpack and i don\'t know how we can use Compass ( CSS Authoring Framework ) in a project.

Is there a good method ?

Thanks

3条回答
  •  渐次进展
    2021-02-20 00:00

    Since compass is a half-ruby and a half-sass framework, compass-mixins may work incorrectly whith legacy scss code.

    To enable the original compass in your webpack config, you should use:

    ruby-sass-loader

    with the compass option.

    module.exports = {
      // ...    
      module: {
        loaders: [
          /* some other loaders */
          {
            test: /\.scss$/,
            loader: 'style!css!ruby-sass?compass=1'
          }
        ]
      }
    };
    

    NB!: Compass is no longer supported

提交回复
热议问题