Merge pull request #206 from Yukaii/webpack-fix-cont

Webpack fix cont.
This commit is contained in:
Max Wu 2016-10-14 17:24:33 +08:00 committed by GitHub
commit f93e8f5fdc
8 changed files with 17 additions and 14 deletions

View File

@ -29,10 +29,8 @@
"file-saver": "^1.3.3",
"flowchart.js": "^1.6.3",
"formidable": "^1.0.17",
"gist-embed": "github:yukaii/gist-embed",
"handlebars": "^4.0.5",
"helmet": "^2.3.0",
"highlight.js": "^9.7.0",
"i18n": "^0.8.3",
"imgur": "git+https://github.com/hackmdio/node-imgur.git",
"jquery": "^3.1.1",

View File

@ -5,9 +5,7 @@ require('prismjs/themes/prism.css');
require('highlight.js/styles/github-gist.css');
/* other vendors plugin */
require('gist-embed');
require('string');
require('highlight.js');
require('prismjs');
require('prismjs/components/prism-wiki');
require('to-markdown');

View File

@ -23,6 +23,8 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.4/lodash.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.5.0/socket.io.min.js" defer></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js" defer></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/gist-embed/2.5/gist-embed.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/viz.js/1.3.0/viz.js" defer></script>
<%- include build/index-scripts %>
<script src="<%- url %>/js/google-drive-upload.js" defer></script>

View File

@ -208,6 +208,8 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" defer></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/list.pagination.js/0.1.1/list.pagination.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.4/lodash.min.js" defer></script>
<%- include build/cover-scripts %>
</body>

View File

@ -103,6 +103,8 @@
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script src="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" defer></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js" defer></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/gist-embed/2.5/gist-embed.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.4/lodash.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/viz.js/1.3.0/viz.js" defer></script>
<%- include build/pretty-scripts %>

View File

@ -104,6 +104,8 @@
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.5/handlebars.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js" defer></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/gist-embed/2.5/gist-embed.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/4.16.4/lodash.min.js" defer></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/viz.js/1.3.0/viz.js" defer></script>
<%- include build/slide-scripts %>

View File

@ -7,11 +7,15 @@ var HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = Object.assign({}, baseConfig, {
plugins: [
new webpack.ProvidePlugin({
'_': 'lodash',
Visibility: "visibilityjs",
Cookies: "js-cookie",
emojify: "emojify.js",
key: "keymaster"
key: "keymaster",
$: "jquery",
jQuery: "jquery",
"window.jQuery": "jquery",
"moment": "moment",
"Handlebars": "handlebars"
}),
new ExtractTextPlugin("[name].css"),
new webpack.optimize.CommonsChunkPlugin({

View File

@ -81,13 +81,11 @@ module.exports = {
locale: path.join(__dirname, 'public/js/locale.js'),
vendor: [
"imports?$=jquery!jquery-mousewheel",
"script!gist-embed",
"expose?filterXSS!xss",
"js-url",
"expose?Spinner!spin.js",
"script!Idle.Js",
"expose?LZString!lz-string",
"expose?ListPagination!list.pagination.js/dist/list.pagination.js",
"script!codemirror",
"script!select2",
"script!inlineAttachment",
@ -129,7 +127,8 @@ module.exports = {
"lodash": "_",
"jquery": "$",
"moment": "moment",
"handlebars": "Handlebars"
"handlebars": "Handlebars",
"highlight.js": "hljs"
},
module: {
@ -160,11 +159,7 @@ module.exports = {
}, {
test: /\.svg(\?v=\d+\.\d+\.\d+)?$/,
loader: "url?limit=10000&mimetype=image/svg+xml"
}],
noParse: [
"gist-embed"
]
}]
},
node: {