Skip to content

Commit

Permalink
Fix code that broke due to webpack 2 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
hackebrot committed May 20, 2017
1 parent de21a28 commit 14c5315
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion webpack/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ var $ = require('jquery');
window.$ = $;
window.jQuery = $;
require("bootstrap");
require("!style!css!bootswatch/yeti/bootstrap.min.css");
require("!style-loader!css-loader!bootswatch/yeti/bootstrap.min.css");


22 changes: 7 additions & 15 deletions webpack/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,19 @@ module.exports = {
},
devtool: '#cheap-module-source-map',
resolve: {
modulesDirectories: ['node_modules'],
extensions: ['', '.js', '.css']
modules: ['node_modules'],
extensions: ['.js']
},
module: {
loaders: [
{ test: /\.js$/, exclude: /node_modules/,
loader: 'babel-loader' },
{ test: /\.scss$/,
loader: ExtractTextPlugin.extract(
'style-loader', 'css-loader!sass-loader') },
{ test: /\.css$/,
loader: ExtractTextPlugin.extract(
'style-loader', 'css-loader') },
{ test: /\.(woff2?|ttf|eot|svg|png|jpe?g|gif)$/,
loader: 'file' }
{ test: /\.js$/, exclude: /node_modules/, loader: 'babel-loader' },
{ test: /\.scss$/, loader: ExtractTextPlugin.extract( { fallback: 'style-loader', use: 'css-loader!sass-loader' } ) },
{ test: /\.css$/, loader: ExtractTextPlugin.extract( { fallback: 'style-loader', use: 'css-loader' } ) },
{ test: /\.(woff2?|ttf|eot|svg|png|jpe?g|gif)$/, loader: 'file-loader' }
]
},
plugins: [
new ExtractTextPlugin('styles.css', {
allChunks: true
}),
new ExtractTextPlugin({filename: 'styles.css', allChunks: true }),
new webpack.optimize.UglifyJsPlugin()
]
};

0 comments on commit 14c5315

Please sign in to comment.