我使用的是使用fontello制作的自定义图标字体。当尝试在webpack中使用它时,我收到以下错误: web pack.config
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
"presets": ["react", "es2015", "stage-0", "react-hmre"]
}
}, {
test: /\.json?$/,
loader: 'json'
}, {
test: /\.css$/,
loader: 'style-loader!css-loader'
}, {test: /\.(eot|svg|ttf|woff|woff2)$/, loader: 'style-loader!css-loader'}
]
}
webpack.production.config
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
"presets": ["es2015", "stage-0", "react"]
}
}, {
test: /\.json?$/,
loader: 'json'
}, {
test: /\.css$/,
loader: ExtractTextPlugin.extract('style', 'style-loader!css-loader')
}, {test: /\.(eot|svg|ttf|woff|woff2)$/, loader: ExtractTextPlugin.extract('style', 'style-loader!css-loader')}
]
}