Webpack error with bootstrap-loader

1

I'm having trouble implementing the bootstrap-loader in the webpack. I get this error output on the console:

  

ERROR in   ./~/css-loader!/~/resolve-url-loader!/~/sass-loader?sourceMap!/~/bootstrap-loader/lib/bootstrap.styles.loader.js!./~/ bootstrap-loader / no-op.js   Module build failed: undefined ^         File style: unorderable: ../../app/assets/styles/bootstrap/pre-customizations.scss Parent style   sheet: stdin         in C: \ Users \ rapha \ Projects \ components \ node_modules \ bootstrap-loader \ no-op.js   (line 2, column 1)   ./~/style-loader!/~/css-loader!/~/resolve-url-loader!/~/sass-loader?sourceMap!/~/bootstrap-loader/lib/bootstrap.styles. loader.js! ./ ~ / bootstrap-loader / no-op.js   4: 14-164

This is my webpack.config.js file:

'use strict'
const webpack = require('webpack')
const path = require('path')
const ExtractTextPlugin = require('extract-text-webpack-plugin')
const autoprefixer = require('autoprefixer')

module.exports = {
    devtool: 'source-map',
    entry: [
        'bootstrap-loader',
        path.join(__dirname, 'src', 'app')
    ],
    output: {
        path: path.join(__dirname, 'dist'),
        filename: 'bundle.js',
        publicPath: '/static/'
    },
    module: {
        loaders: [{
            test: /\.js$/,
            exclude: /node_modules/,
            include: /src/,
            loader: 'babel'
        }, {
            test: /\.css$/,
            loaders: ['style', 'css', 'postcss']
        }, {
            test: /\.scss$/,
            loaders: ['style', 'css', 'postcss', 'sass']
        }, {
            test: /bootstrap-sass\/assets\/javascripts\//,
            loader: 'imports?jQuery=jquery'
        }]
    },
    postcss: [autoprefixer]
}

Any idea what it might be?

    
asked by anonymous 05.09.2016 / 17:52

1 answer

1

It looks like you should be using a require ('../../ app / assets / styles / bootstrap / pre-customizations.scss') somewhere. The problem is that from the file you are using it does not find ... try checking the path informed

    
18.09.2016 / 23:03