Do you want to request a feature or report a bug?
bug
What is the current behavior?
4.0.0-beta.0
does not build
ERROR in ./node_modules/rs-styles/images/sampleStamp.png
Module build failed: TypeError: Cannot read property 'fileLoader' of undefined
at Object.module.exports (/Users/uri/Documents/connect/dashboard/node_modules/file-loader/index.js:14:28)
at Object.module.exports (/Users/uri/Documents/connect/dashboard/node_modules/url-loader/index.js:31:23)
@ ./node_modules/css-loader!./node_modules/rs-styles/projects/connect/css/connect.css 6:118235-118277
@ ./node_modules/css-loader!./css/connect.css
@ ./css/connect.css
@ ./js/app.js
@ ./js/bootstrap-app.js
@ ./js/dashboard-dev.js
@ multi babel-polyfill ./js/dashboard-dev.js
If the current behavior is a bug, please provide the steps to reproduce.
module.exports = {
entry: {
dashboard: ['babel-polyfill', './js/dashboard-dev.js'],
},
output: {
path: path.join(__dirname, '/out'),
filename: '[name].entry.js',
publicPath: 'out/',
},
module: {
rules: [
{
test: /\.js$/,
exclude,
use: [
{
loader: 'babel-loader',
},
],
},
{
test: /\.css$/,
use: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
},
],
},
{
test: /\.(ttf|eot|svg|gif|jpg|png|woff|woff2)(\?v=[0-9]\.[0-9]\.[0-9])?$/,
use: [
{
loader: 'url-loader',
options: {
limit: 10000,
},
},
],
},
{
test: /\.html$/,
use: [
{
loader: 'ngtemplate-loader',
options: {
relativeTo: path.resolve(__dirname, './js'),
},
},
{
loader: 'html-loader',
},
],
},
],
},
plugins: [
new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
new webpack.optimize.SplitChunksPlugin({
filename: 'commons.js',
name: 'commons',
}),
new webpack.ProvidePlugin({
Promise: 'bluebird',
}),
new StatsPlugin('stats.json'),
],
devtool: 'source-map',
};
What is the expected behavior?
Successful build
If this is a feature request, what is motivation or use case for changing the behavior?
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.
Node 6.12.3
webpack 4.0.0-beta.0
mac osx hi sierra
@frankandrobot
url-loader
use old versionfile-loader
, looks https://github.com/webpack-contrib/file-loader/blob/v0.11.2/index.js#L14 (old code). Try to updatefile-loader
to latest versionCould have sworn I had done that, but I updated both url-loader and file-loader to latest and now it seems to build.