webpack能即用style-loader 也能用extract-text-webpack-plugin ?

xhonker
  • 17

有css的想直接插入html 有的想用extract-text-webpack-plugin合并打包。webpack 有解决吗?

回复
阅读 2.6k
1 个回答
frontoldman
  • 4.5k

可以的,用include和exclude区分

      {
        test: /\.less$/,
        loader: "style!css!less",
        include: path.join(__dirname, '../'),
        exclude: [/viewChart/]
      },
      {
        test: /\.less$/,
        loader: "style!css!autoprefixer?browsers=last 2 versions!less",
        include: [/viewChart/],
      },
宣传栏