React bootstrap不呈现样式

时间:2017-05-07 18:34:55

标签: reactjs webpack react-bootstrap

当一切设置正常时,引导样式不会呈现。我已经安装了react-bootstrap和导入的bootstrap css,但我无法获得渲染的样式。我可以通过create-react-app样板工作。我怀疑它与我的引导程序有关。这是我的webpack.config文件:

var path = require('path');
var webpack = require('webpack');

module.exports = {
    devServer: {
        inline: true,
        contentBase: './src',
        port: 3000
    },
    devtool: 'cheap-module-eval-source-map',
    entry: './dev/js/index.js',
    module: {
        loaders: [
            {
                test: /\.js$/,
                loader: 'babel',
                query: {
                  presets: ['es2015', 'react', 'stage-0']
                },
                exclude: /node_modules/
            },
            {
                test: /\.css$/,
                loaders: [
                    'style?sourceMap',
                    'css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]'
                ]
            },
            {
                test: /\.(png|jpg)$/,
                loader: 'url?limit=25000'
            }
        ]
    },
    output: {
        path: 'src',
        filename: 'js/bundle.min.js'
    },
    plugins: [
        new webpack.optimize.OccurrenceOrderPlugin()
    ]
};

0 个答案:

没有答案