Reputation: 485
How can show a right webpack 2 rc3 configuration with bootstap 4?
Here is my .bootstraprc
This is my webpack.config.js
And after all I get this error on npm start:
Error in ./~/extract-text-webpack-plugin/loader.js?{"omit":1,"remove":true}!./~/style-loader!./~/resolve-url-loader!./~/sass-loader?sourceMap!./~/bootstrap-loader/lib/bootstrap.styles.loader.js?{"bootstrapVersion":4,"extractStyles":true,"styleLoaders":["style-loader","css-loader","postcss-loader","sass-loader"],"styles":["mixins","normalize","print","reboot","type","images","code","grid","tables","forms","buttons","transitions","dropdown","button-group","input-group","custom-forms","nav","navbar","card","breadcrumb","pagination","jumbotron","alert","progress","media","list-group","responsive-embed","close","badge","modal","tooltip","popover","carousel","utilities"],"scripts":false,"configFilePath":"/Users/ivan/Dev/react/.bootstraprc","bootstrapPath":"/Users/ivan/Dev/react/~/bootstrap","bootstrapRelPath":"../bootstrap"}!./~/bootstrap-loader/no-op.js Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'path' of undefined @ ./~/bootstrap-loader/lib/bootstrap.loader.js?extractStyles!./~/bootstrap-loader/no-op.js 1:21-1040 @ ./~/bootstrap-loader/extractStyles.js @ multi app
Error in ./~/extract-text-webpack-plugin/loader.js?{"omit":1,"remove":true}!./~/style-loader!./~/resolve-url-loader!./~/sass-loader?sourceMap!./~/bootstrap-loader/lib/bootstrap.styles.loader.js?{"bootstrapVersion":4,"extractStyles":true,"styleLoaders":["style-loader","css-loader","postcss-loader","sass-loader"],"styles":["mixins","normalize","print","reboot","type","images","code","grid","tables","forms","buttons","transitions","dropdown","button-group","input-group","custom-forms","nav","navbar","card","breadcrumb","pagination","jumbotron","alert","progress","media","list-group","responsive-embed","close","badge","modal","tooltip","popover","carousel","utilities"],"scripts":false,"configFilePath":"/Users/ivan/Dev/react/.bootstraprc","bootstrapPath":"/Users/ivan/Dev/react/~/bootstrap","bootstrapRelPath":"../bootstrap"}!./~/bootstrap-loader/no-op.js Module build failed: ModuleBuildError: Module build failed: TypeError: Cannot read property 'path' of undefined at Object. (/Users/ivan/Dev/react/node_modules/async/dist/async.js:2234:31)
Upvotes: 1
Views: 382
Reputation: 485
I've fixed my issues. The problem was in webpack.config.js
How it was:
new webpack.LoaderOptionsPlugin({
...
options: {
...
context: path.resolve(__dirname, '.'),
...
},
...
})
How should it be
new webpack.LoaderOptionsPlugin({
...
options: {
...
context: path.resolve(__dirname, '.'),
output: {
path: 'dist',
},
...
},
...
})
Upvotes: 1