From ba6543b85040d37ef83f04e3d5863c41671ca471 Mon Sep 17 00:00:00 2001 From: Armaan Ahluwalia Date: Fri, 6 Jul 2018 18:54:05 +0530 Subject: [PATCH] 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. --- .eslintrc.json | 1 - static/js/lightbox_canvas.js | 2 +- tools/webpack.config.ts | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index d732833a39..2605a591a8 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,7 +12,6 @@ "run_test": false, "schema": false, "jQuery": false, - "Spinner": false, "Handlebars": false, "XDate": false, "zxcvbn": false, diff --git a/static/js/lightbox_canvas.js b/static/js/lightbox_canvas.js index 01d90d03a2..10e056fffa 100644 --- a/static/js/lightbox_canvas.js +++ b/static/js/lightbox_canvas.js @@ -333,4 +333,4 @@ var LightboxCanvas = (function () { if (typeof module !== 'undefined') { module.exports = LightboxCanvas; } -window.lightbox_canvas = LightboxCanvas; +window.LightboxCanvas = LightboxCanvas; diff --git a/tools/webpack.config.ts b/tools/webpack.config.ts index b366d8781d..c73f75e679 100644 --- a/tools/webpack.config.ts +++ b/tools/webpack.config.ts @@ -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));