请问如何配置,试了很多都是报错
import是babel的插件,你能写在extract-text-webpack里面也是牛比
var path=require('path'); var ExtractTextPlugin = require("extract-text-webpack-plugin"); const extractCSS = new ExtractTextPlugin('stylesheets/[name]-one.css'); const extractLESS = new ExtractTextPlugin('stylesheets/[name]-two.css'); module.exports = { entry: { index:path.resolve(__dirname, './app/index.js'), layout:path.resolve(__dirname, './app/layout.js') }, output: { filename: "[name].js", path: __dirname + '/build' }, module: { loaders: [ { test: /\.js$/, loader: "babel-loader", exclude: /(node_modules|bower_components)/, query: { presets: ['react','es2015'], "plugins":[ ["import",{"libraryName":"antd","style":true}] ] } }, { test: /\.css$/, loader: 'style-loader!css-loader' }, { test: /\.less$/, use: extractLESS.extract([ 'css-loader', 'less-loader' ]) } ] }, plugins: [ extractCSS, extractLESS ] }
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(2)
import是babel的插件,你能写在extract-text-webpack里面也是牛比