webpack: модуль не найден: ошибка: не удается разрешить '../fonts/330575_5_0.woff'
Когда я пытаюсь собрать, я получаю эту ошибку:
ERROR in ./node_modules/css-loader!./views/css/reset.css
Module not found: Error: Can't resolve '../fonts/330575_6_0.eot' in '/home/phil/whattheacutfal/views/css'
@ ./node_modules/css-loader!./views/css/reset.css 6:2215-2249
Я буквально не знаю, почему это происходит, хотя я использовал url-загрузчик для загрузки таких шрифтов eot
и некоторые шрифты.
Это мое webpack.config.js
ниже
const path = require('path')
const webpack = require('webpack')
const HtmlPlugin = require('html-webpack-plugin')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const config = {
entry: './src/main-entry.js',
output: {
path: __dirname,
filename: 'bundle.js'
},
plugins: [
new ExtractTextPlugin('bundle.css'),
new HtmlPlugin({
template: 'views/index.pug'
}),
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: '"production"'
}
})
],
module: {
rules: [
{ test: /\.(png|woff|woff2|eot|ttf|svg)$/, loader: 'url-loader?limit=100000' },
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
use: 'css-loader', fallback: 'style-loader'
})
},
{
test: /\.(png|jpe?g|gif|svg|ttf|woff2?|eot)$/,
loader: 'file-loader',
options: { name: '[name].[ext]?[hash]' }
}
]
},
plugins: [
new ExtractTextPlugin('bundle.css'),
new webpack.optimize.UglifyJsPlugin({
include: /\.min\.js$/,
minimize: true
})
]
}
module.exports = config