var webpack=require('webpack');var htmlPlugin=require('html-webpack-plugin');var ExtractTextPlugin=require('extract-text-webpack-plugin');var path=require('path');var webpack={ entry:{ main:'./www/portal/register/register_1/js/register_1.js' }, output:{ path:path.join(__dirname,'./dist'), filename:'bundle.js' }, module:{ rules:[ { test:/\.css$/, use: [ ExtractTextPlugin.extract({ fallbackLoader:"style-loader", loader:"css-loader", publicPath:'./dist'})] }, { test:/\.(png|gif|swf|jpg|pkg|PNG|GIF|SWF|JPG|PKG)$/, use:['file-loader'] } ] }, plugins:[ new ExtractTextPlugin({ filename:'bundle.css', disable:false, allChunks:true }), new htmlPlugin({ template:'./index.html', filename:'index.html' }) ]};module.exports=webpack;
添加回答
举报
0/150
提交
取消