[WIP] webpack stuff

This commit is contained in:
Tom Raithel
2017-01-25 11:58:24 +01:00
parent 74bfec3366
commit 3443ae050a
3 changed files with 20 additions and 3 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
dist dist
node_modules node_modules
npm-debug.log

View File

@@ -23,7 +23,9 @@
"front-matter": "2.1.1", "front-matter": "2.1.1",
"fs-extra": "2.0.0", "fs-extra": "2.0.0",
"marked": "0.3.6", "marked": "0.3.6",
"postcss-loader": "1.2.2",
"pug": "2.0.0-beta8", "pug": "2.0.0-beta8",
"style-loader": "0.13.1",
"walk": "2.3.9", "walk": "2.3.9",
"webpack": "2.2.0" "webpack": "2.2.0"
} }

View File

@@ -1,10 +1,20 @@
var path = require('path'); var path = require('path');
var ExtractTextPlugin = require("extract-text-webpack-plugin"); var ExtractTextPlugin = require("extract-text-webpack-plugin");
const cssLoader = ExtractTextPlugin.extract({ let cssLoader = ExtractTextPlugin.extract({
loader: "css-loader" fallbackLoader: "style-loader",
loader: [
"css-loader",
"postcss-loader",
]
}); });
console.log('------------------------------');
console.log(cssLoader);
console.log('------------------------------');
// cssLoader = 'css-loader';
module.exports = { module.exports = {
entry: { entry: {
bundle: './js/radar.js', bundle: './js/radar.js',
@@ -28,7 +38,11 @@ module.exports = {
include: [ include: [
path.resolve(__dirname, "styles") path.resolve(__dirname, "styles")
], ],
loader: cssLoader, use: [
{
loader: cssLoader,
}
],
}, },
], ],
}, },