我下载了一些使用手写笔,babel,webpack和es6的boilerplate。我想在index.html中使用一个基本链接到样式表(style.css),但它不起作用。我在想webpack loader中的某些内容阻止了它,所以我在下面注释了它,但它仍然没有连接到我的基本style.css。
var path = require('path');
var webpack = require('webpack');
module.exports = {
devtool: 'source-map',
entry: [
'webpack-hot-middleware/client',
'./client/pokeapp'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin()
],
module: {
loaders: [
// js
{
test: /\.js$/,
loaders: ['babel'],
include: path.join(__dirname, 'client')
}
// CSS
// {
// test: /\.styl$/,
// include: path.join(__dirname, 'client'),
// loader: 'style-loader!css-loader!stylus-loader'
// }
]
}
};