Skip to content

Commit

Permalink
Proper loaders
Browse files Browse the repository at this point in the history
  • Loading branch information
tlovett1 committed Mar 6, 2017
1 parent 651fb42 commit 470a052
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/components/Skill/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import '../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap/variables';
@import 'bootstrap/variables';

.code {
white-space: pre;
Expand Down
4 changes: 2 additions & 2 deletions src/containers/App/index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@import '../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap-sprockets';
@import '../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap';
@import 'bootstrap-sprockets';
@import 'bootstrap';
51 changes: 36 additions & 15 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,32 +1,53 @@
var path = require('path');
var webpack = require('webpack');

var loaders = [
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
loader: 'babel-loader'
},
{
test: /\.scss$/,
loaders: ['style-loader', 'css-loader', 'sass-loader']
}
];

module.exports = {
entry: __dirname + '/src/index.js',
devtool: 'inline-source-map',
watch: true,
output: {
path:'/',
filename: 'dist/client.js'
path:'/',
filename: 'dist/client.js'
},
module: {
loaders: loaders
rules: [
{
test: /\.scss$/,
use: [
{
loader: "style-loader"
},
{
loader: "css-loader"
},
{
loader: "sass-loader",
options: {
includePaths: [path.join(__dirname, 'node_modules/bootstrap-sass/assets/stylesheets')]
}
}
]
},
{
test: /\.jsx?$/,
exclude: /(node_modules|bower_components)/,
use: [
{
loader: 'babel-loader'
}
]
}
]
},
stats: {
colors: true
},
resolveLoader: {
modules: [path.join(__dirname, 'node_modules')]
},
resolve: {
modules: [path.join(__dirname, 'node_modules')]
},
plugins: [
new webpack.DefinePlugin({
DEBUG: (process.env.DEBUG && process.env.DEBUG.match(/app/i)) ? true : false
Expand Down

0 comments on commit 470a052

Please sign in to comment.