summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYukai Huang2016-10-09 18:08:46 +0800
committerYukai Huang2016-10-09 18:22:31 +0800
commitd0997ed0c18de0f17ea2f9435558f88e3f0fdd1c (patch)
treeb7def92599caa35255f7977169646c5b683480c3
parent28858288fbc386350022bc4830775d21af217c11 (diff)
Config TextExtract plugin and change build folder
-rw-r--r--public/views/foot.ejs2
-rw-r--r--public/views/head.ejs1
-rw-r--r--webpack.config.js9
3 files changed, 7 insertions, 5 deletions
diff --git a/public/views/foot.ejs b/public/views/foot.ejs
index 0ad10546..7df96b58 100644
--- a/public/views/foot.ejs
+++ b/public/views/foot.ejs
@@ -31,7 +31,7 @@
<script src="<%- url %>/vendor/codemirror-spell-checker/spell-checker.min.js" defer></script>
<script src="<%- url %>/vendor/ot/ot.min.js" defer></script>
<script src="<%- url %>/vendor/xss.min.js" defer></script>
-<script src="<%- url %>/build/js/app.js" defer></script>
+<script src="<%- url %>/build/app.js" defer></script>
<script src="<%- url %>/js/google-drive-upload.js" defer></script>
<script src="<%- url %>/js/google-drive-picker.js" defer></script>
<script src="<%- url %>/js/reveal-markdown.js" defer></script>
diff --git a/public/views/head.ejs b/public/views/head.ejs
index 6890ddf3..2aa85689 100644
--- a/public/views/head.ejs
+++ b/public/views/head.ejs
@@ -36,6 +36,7 @@
<link rel="stylesheet" href="<%- url %>/vendor/showup/showup.css">
<link rel="stylesheet" href="<%- url %>/css/mermaid.css">
<link rel="stylesheet" href="<%- url %>/css/markdown.css">
+<link rel="stylesheet" href="<%- url %>/build/app.css">
<link rel="stylesheet" href="<%- url %>/css/index.css">
<link rel="stylesheet" href="<%- url %>/css/extra.css">
<link rel="stylesheet" href="<%- url %>/css/slide-preview.css">
diff --git a/webpack.config.js b/webpack.config.js
index cad356fb..8fce2653 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -20,7 +20,8 @@ module.exports = {
}),
new webpack.DefinePlugin({
"require.specified": "require.resolve"
- })
+ }),
+ new ExtractTextPlugin("[name].css")
],
entry: {
@@ -28,7 +29,7 @@ module.exports = {
},
output: {
- path: path.join(__dirname, 'public/build/js'),
+ path: path.join(__dirname, 'public/build'),
filename: '[name].js'
},
@@ -49,10 +50,10 @@ module.exports = {
loader: 'json-loader'
}, {
test: /\.css$/,
- loader: 'style-loader!css-loader'
+ loader: ExtractTextPlugin.extract('style-loader', 'css-loader')
}, , {
test: /\.scss$/,
- loaders: ['style', 'css', 'sass']
+ loader: ExtractTextPlugin.extract('style-loader', 'sass-loader')
}, {
test: require.resolve("js-sequence-diagrams"),
loader: "imports?Raphael=raphael"