[WIP] webpack stuff
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
|||||||
dist
|
dist
|
||||||
node_modules
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
|
|||||||
@@ -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"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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")
|
||||||
],
|
],
|
||||||
|
use: [
|
||||||
|
{
|
||||||
loader: cssLoader,
|
loader: cssLoader,
|
||||||
|
}
|
||||||
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user