webpack: Fix missing exposed modules left out of transition.

This commit fixes some modules that were erroneously left out while
transitioning app.js to webpack. This commit exposes them using
expose-loader or setting them directly to window.
This commit is contained in:
Armaan Ahluwalia 2018-07-06 18:54:05 +05:30 committed by Tim Abbott
parent de40a7c2f6
commit ba6543b850
3 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,6 @@
"run_test": false,
"schema": false,
"jQuery": false,
"Spinner": false,
"Handlebars": false,
"XDate": false,
"zxcvbn": false,

View File

@ -333,4 +333,4 @@ var LightboxCanvas = (function () {
if (typeof module !== 'undefined') {
module.exports = LightboxCanvas;
}
window.lightbox_canvas = LightboxCanvas;
window.LightboxCanvas = LightboxCanvas;

View File

@ -134,7 +134,8 @@ export default (env?: string) : webpack.Configuration => {
{ path: "../node_modules/underscore/underscore.js", name: '_' },
{ path: "../node_modules/handlebars/dist/handlebars.runtime.js", name: 'Handlebars' },
{ path: "../node_modules/to-markdown/dist/to-markdown.js", name: 'toMarkdown' },
{ path: "../node_modules/sortablejs/Sortable.js"}
{ path: "../node_modules/sortablejs/Sortable.js"},
{ path: "../node_modules/winchan/winchan.js", name: 'WinChan'}
];
config.module.rules.push(...getExposeLoaders(exposeOptions));