mirror of https://github.com/status-im/codimd.git
Update webpack and slide resource loading to reduce pack size
This commit is contained in:
parent
47d5efb29e
commit
c59b4cb883
|
@ -93,7 +93,6 @@
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/3.3.0/js/reveal.min.js" integrity="sha256-lvaInSKflJWLPqf5N5oHr/UZFwXKD6gckerdwoHqECY=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/velocity/1.3.1/velocity.min.js" integrity="sha256-zt0EvRuKYSkXKgIFLrJIYeZsBjIZLel9UThCm5GI6io=" crossorigin="anonymous" defer></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha256-U5ZEeKfGNOja007MMD3YBI0A3OSZOQbeG6z2f2Y0hu8=" crossorigin="anonymous" defer></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.13/jquery.mousewheel.min.js" integrity="sha256-jnOjDTXIPqall8M0MyTSt98JetJuZ7Yu+1Jm7hLTF7U=" crossorigin="anonymous" defer></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/3.6.1/js-yaml.min.js" integrity="sha256-tvANaUGcQTLkCS9wHnLZhBFVfIWQJpm98WOpykjD+eo=" crossorigin="anonymous" defer></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" integrity="sha256-yYfngbEKv4RENfGDvNUqJTqGFcKf31NJEe9OTnnMH3Y=" crossorigin="anonymous" defer></script>
|
||||
|
|
|
@ -116,7 +116,7 @@ module.exports = {
|
|||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
template: 'public/views/includes/scripts.ejs',
|
||||
chunks: ['common', 'slide-pack'],
|
||||
chunks: ['slide-pack'],
|
||||
filename: path.join(__dirname, 'public/views/build/slide-pack-scripts.ejs'),
|
||||
inject: false
|
||||
}),
|
||||
|
@ -283,6 +283,7 @@ module.exports = {
|
|||
path.join(__dirname, 'public/js/pretty.js')
|
||||
],
|
||||
slide: [
|
||||
"bootstrap-tooltip",
|
||||
"expose?filterXSS!xss",
|
||||
"flowchart.js",
|
||||
"js-sequence-diagrams",
|
||||
|
@ -301,6 +302,10 @@ module.exports = {
|
|||
path.join(__dirname, 'public/vendor/bootstrap/tooltip.min.css')
|
||||
],
|
||||
"slide-pack": [
|
||||
"expose?jQuery!expose?$!jquery",
|
||||
"velocity-animate",
|
||||
"imports?$=jquery!jquery-mousewheel",
|
||||
"bootstrap-tooltip",
|
||||
"expose?jsyaml!js-yaml",
|
||||
"script!mermaid",
|
||||
"expose?moment!moment",
|
||||
|
|
Loading…
Reference in New Issue