// Example file. Copy this to your project
module.exports = {
verbose: true, // Set to true to show diagnostic information
// IMPORTANT: Set next two configuration so you can customize
// bootstrapCustomizations: gets loaded before bootstrap so you can configure the variables used by bootstrap
// mainSass: gets loaded after bootstrap, so you can override a bootstrap style.
// NOTE, these are optional.
bootstrapCustomizations: "src/styles/bootstrap.scss",
mainSass: "src/styles/main.scss",
// Default for the style loading
styleLoader: "style-loader!css-loader!sass-loader",
//
// If you want to use the ExtractTextPlugin
// and you want compressed
// styleLoader: ExtractTextPlugin.extract("style-loader", "css-loader!sass-loader"),
//
// If you want expanded CSS
// styleLoader: ExtractTextPlugin.extract("style-loader", "css-loader!sass?outputStyle=expanded"),
scripts: {
'transition': true,
'alert': true,
'button': true,
'carousel': true,
'collapse': true,
'dropdown': true,
'modal': true,
'tooltip': true,
'popover': true,
'scrollspy': true,
'tab': true,
'affix': true
},
styles: {
"mixins": true,
"normalize": true,
"print": true,
"scaffolding": true,
"type": true,
"code": true,
"grid": true,
"tables": true,
"forms": true,
"buttons": true,
"component-animations": true,
"glyphicons": true,
"dropdowns": true,
"button-groups": true,
"input-groups": true,
"navs": true,
"navbar": true,
"breadcrumbs": true,
"pagination": true,
"pager": true,
"labels": true,
"badges": true,
"jumbotron": true,
"thumbnails": true,
"alerts": true,
"progress-bars": true,
"media": true,
"list-group": true,
"panels": true,
"wells": true,
"close": true,
"modals": true,
"tooltip": true,
"popovers": true,
"carousel": true,
"utilities": true,
"responsive-utilities": true
}
};
/*
* Webpack development server configuration
*
* This file is set up for serving the webpack-dev-server, which will watch for changes and recompile as required if
* the subfolder /webpack-dev-server/ is visited. Visiting the root will not automatically reload.
*/
'use strict';
var webpack = require('webpack'),
path = require('path'),
ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
output: {
filename: 'app.js',
publicPath: '/assets/'
},
cache: true,
debug: true,
devtool: false,
entry: [
'webpack/hot/only-dev-server',
'./src/scripts/app.js',
'bootstrap-sass!./bootstrap-sass.config.js'
],
stats: {
colors: true,
reasons: true
},
resolve: {
extensions: ['', '.js'],
alias: {
'styles': __dirname + '/src/styles',
'components': __dirname + '/src/scripts/components',
'actions': __dirname + '/src/scripts/actions',
'stores': __dirname + '/src/scripts/stores',
'constants': __dirname + '/src/scripts/constants'
}
},
module: {
preLoaders: [{
test: /\.js$/,
exclude: /node_modules|bootstrap-sass.config.js/,
loader: 'jsxhint'
}],
loaders: [{
test: /\.js$/,
exclude: /node_modules|bootstrap-sass.config.js/,
loader: 'react-hot!jsx-loader?harmony!babel-loader?optional=runtime'
}, {
test: /\.scss/,
loader: 'style-loader!css-loader!sass-loader?outputStyle=expanded'
}, {
test: /\.css$/,
loader: 'style-loader!css-loader'
}, {
test: /\.(png|woff|woff2|eot|ttf|svg|jpg)$/,
loader: 'url-loader?limit=8192'
},
{ test: /bootstrap\/js\//, loader: 'imports?jQuery=jquery' },
// Needed for the css-loader when [bootstrap-webpack](https://github.com/bline/bootstrap-webpack)
// loads bootstrap's css.
{ test: /\.woff(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&minetype=application/font-woff" },
{ test: /\.ttf(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&minetype=application/octet-stream" },
{ test: /\.eot(\?v=\d+\.\d+\.\d+)?$/, loader: "file" },
{ test: /\.svg(\?v=\d+\.\d+\.\d+)?$/, loader: "url?limit=10000&minetype=image/svg+xml" }
]
},
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.NoErrorsPlugin(),
new webpack.ProvidePlugin({
$: "jquery",
jQuery: "jquery",
"windows.jQuery": "jquery"
}),
new ExtractTextPlugin("main.css")
]
};