Skip to content

Instantly share code, notes, and snippets.

@deptno
Created May 26, 2016 01:46
Show Gist options
  • Save deptno/4ace8b874d2ececc4bcdc3938b72cf6f to your computer and use it in GitHub Desktop.
Save deptno/4ace8b874d2ececc4bcdc3938b72cf6f to your computer and use it in GitHub Desktop.
webpack css loader boilerplate
body, ebong {
background-color: red;
}
require('bootstrap/dist/css/bootstrap.css');
require('./bong.css');
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"pack": "webpack"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"bootstrap": "^3.3.6",
"css-loader": "^0.23.1",
"style-loader": "^0.13.1",
"webpack": "^1.13.1"
}
}
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: [
'./index'
],
output: {
path: path.join(__dirname, 'dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
module: {
loaders: [
{
test: /\.css$/,
loader: "style-loader!css-loader"
}
]
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment