mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
Load handlebars without script-loader
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
a98d184f2c
commit
1150c72fa7
2 changed files with 2 additions and 7 deletions
|
@ -18,6 +18,7 @@ import markdownitContainer from 'markdown-it-container'
|
|||
import Plugin from 'markdown-it-regexp'
|
||||
|
||||
import mermaid from 'mermaid'
|
||||
import handlebars from 'handlebars'
|
||||
|
||||
require('prismjs/themes/prism.css')
|
||||
require('prismjs/components/prism-wiki')
|
||||
|
@ -666,7 +667,7 @@ export function exportToHTML (view) {
|
|||
// generate html via template
|
||||
$.get(`${serverurl}/build/html.min.css`, css => {
|
||||
$.get(`${serverurl}/views/html.hbs`, data => {
|
||||
const template = window.Handlebars.compile(data)
|
||||
const template = handlebars.compile(data)
|
||||
const context = {
|
||||
url: serverurl,
|
||||
title,
|
||||
|
|
|
@ -20,7 +20,6 @@ module.exports = {
|
|||
jQuery: 'jquery',
|
||||
'window.jQuery': 'jquery',
|
||||
'moment': 'moment',
|
||||
'Handlebars': 'handlebars',
|
||||
CodeMirror: 'codemirror/lib/codemirror.js'
|
||||
}),
|
||||
new HtmlWebpackPlugin({
|
||||
|
@ -249,7 +248,6 @@ module.exports = {
|
|||
'bootstrap-validator',
|
||||
'expose-loader?exposes=jsyaml!js-yaml',
|
||||
'expose-loader?exposes=moment!moment',
|
||||
'script-loader!handlebars',
|
||||
'expose-loader?exposes=hljs!highlight.js',
|
||||
'expose-loader?exposes=emojify!emojify.js',
|
||||
'script-loader!gist-embed',
|
||||
|
@ -284,7 +282,6 @@ module.exports = {
|
|||
'babel-polyfill',
|
||||
'expose-loader?exposes=jsyaml!js-yaml',
|
||||
'expose-loader?exposes=moment!moment',
|
||||
'script-loader!handlebars',
|
||||
'expose-loader?exposes=hljs!highlight.js',
|
||||
'expose-loader?exposes=emojify!emojify.js',
|
||||
'script-loader!gist-embed',
|
||||
|
@ -321,7 +318,6 @@ module.exports = {
|
|||
'bootstrap-tooltip',
|
||||
'expose-loader?exposes=jsyaml!js-yaml',
|
||||
'expose-loader?exposes=moment!moment',
|
||||
'script-loader!handlebars',
|
||||
'expose-loader?exposes=hljs!highlight.js',
|
||||
'expose-loader?exposes=emojify!emojify.js',
|
||||
'script-loader!gist-embed',
|
||||
|
@ -345,7 +341,6 @@ module.exports = {
|
|||
modules: ['node_modules'],
|
||||
extensions: ['.js'],
|
||||
alias: {
|
||||
handlebars: path.join(__dirname, 'node_modules/handlebars/dist/handlebars.min.js'),
|
||||
'gist-embed': path.join(__dirname, 'node_modules/gist-embed/gist-embed.min.js'),
|
||||
'bootstrap-tooltip': path.join(__dirname, 'public/vendor/bootstrap/tooltip.min.js'),
|
||||
'reveal-markdown': path.join(__dirname, 'public/js/reveal-markdown.js'),
|
||||
|
@ -359,7 +354,6 @@ module.exports = {
|
|||
'socket.io-client': 'io',
|
||||
'jquery': '$',
|
||||
'moment': 'moment',
|
||||
'handlebars': 'Handlebars',
|
||||
'highlight.js': 'hljs',
|
||||
'select2': 'select2'
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue