这是报错提示
我的config:
var path = require('path');
var webpack = require('webpack');
var HtmlwebpackPlugin = require('html-webpack-plugin');
var ROOT_PATH = path.resolve(__dirname);
var APP_PATH = path.resolve(ROOT_PATH, 'src');
var BUILD_PATH = path.resolve(ROOT_PATH, 'build');
var TEM_PATH = path.resolve(ROOT_PATH,'templates');
module.exports = {
entry : {
main : APP_PATH + '/js/main.js',
vendors : ['jquery','moment']
},
devtool: 'eval-source-map',
output : {
path : BUILD_PATH,
filename : '[name].js'
},
devServer: {
historyApiFallback: true,
hot: true,
inline: true,
progress: true,
port : 8082,
proxy :{
'/itemCategory/*':{
target : 'http://localhost:8082',
secure : false
}
}
},
loaders :[
{
test: /\.css$/,
loaders: ['style', 'css'],
}
],
plugins : [
new HtmlwebpackPlugin({
title : '澳門記憶',
template : path.resolve(TEM_PATH,'index.html'),
chunks : ['main','vendors'],//这个插件告诉插件需要引入哪几个入口文件
inject: 'body'//插入到body
}),
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"window.jQuery": "jquery"
}),
new webpack.optimize.UglifyJsPlugin({minimize: true}),//代码压缩
new webpack.optimize.CommonsChunkPlugin('vendors', 'vendors.js')//将入口文件的vendors打包成vendors.js
]
}
main.js入口文件是这样调用的:
require('../css/common.css');找了一下午都没能解决这个问题,求助大大
可否贴出完整css代码。