Skip to content

bootstrap loader issue #5

@maniR1990

Description

@maniR1990

bootsrap loader is not loading and it throws error

`ERROR in ./node_modules/css-loader!./node_modules/resolve-url/resolve-url.js!./node_modules/sass-loader/lib/loader.js?sourceMap!./node_modules/bootstrap-lo
ader/lib/bootstrap.styles.loader.js!./node_modules/bootstrap-loader/no-op.js
Module build failed:
module.exports = {};

^
File to import not found or unreadable: ../../app/styles/bootstrap/pre-customizations.scss.
Parent style sheet: stdin
in E:\Work\react\webpack\node_modules\bootstrap-loader\no-op.js (line 1, column 1)`

please correct me where i went wrong

im sharing my webpack config file.
webpack.config

`var HtmlWebpackPlugin = require('html-webpack-plugin');
var ExtractTextPlugin = require("extract-text-webpack-plugin");
var webpack = require('webpack');
var path = require("path");
var bootstrapEntryPoints = require('./webpack.bootstrap.config');

var isProd = process.env.NODE_ENV === 'production' // true or false
var cssDev = ['style-loader', 'css-loader', 'sass-loader']
var cssProd = ExtractTextPlugin.extract({
fallback: 'style-loader',
use: ['css-loader', 'sass-loader'],
publicPath: '/dist'
})
var cssConfig = isProd ? cssProd : cssDev;
var bootstrapConfig = isProd ? bootstrapEntryPoints.prod : bootstrapEntryPoints.dev;

module.exports = {

entry:{
index:'./src/index.js',
bootstrap:bootstrapConfig
},

output: {
 path: path.resolve(__dirname + '/dist'),
	filename: "bundle.js"
},

module:{
rules:[
{
test: /.scss$/,
use: cssConfig
},
{ test: /.js$/,
exclude: /node_modules/,
loader: "babel-loader"
},
{ test: /.(jpg|jpeg|png|gif|svg)$/i,
loader: [
"file-loader?name=/images/[name].[ext]",
"image-webpack-loader"
]
},
{ test: /.(woff2?)$/, use: 'url-loader?limit=10000&name=fonts/[name].[ext]' },
{ test: /.(ttf|eot)$/, use: 'file-loader?name=fonts/[name].[ext]' },
{ test:/bootstrap-sass[/\]assets[/\]javascripts[/\]/, use: 'imports-loader?jQuery=jquery' }
]
},
devServer: {
contentBase: path.join(__dirname, "dist"),
compress: true,
hot: true,
stats: "errors-only",
port:3000,
open: true,
openPage:''

},

plugins: [new HtmlWebpackPlugin({
title:'React Project Demo',
minify:{
collapseWhitespace:true
},
hash:true,
template:'./src/index.html'

}),
new ExtractTextPlugin({
filename: "bundle.css",
disable: !isProd,
allChunks: true
}),
new webpack.HotModuleReplacementPlugin()
]

`}``

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions