Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
rhansen committed Jan 21, 2022
1 parent cb50156 commit 91b2203
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/node/hooks/express/specialpages.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@ exports.expressCreateServer = async (hookName, args) => {
path: path.join(settings.root, 'var/js'),
filename: '[name]-[contenthash].js',
},
resolve: {
alias: {
'ep_etherpad-lite': path.join(settings.root, 'src'),
},
},
});
const stats = await util.promisify(compiler.run.bind(compiler))();
console.log(`webpack stats:\n${stats}`);
Expand Down
7 changes: 7 additions & 0 deletions src/templates/padbootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
// sends the CLIENT_VARS message.
randomVersionString: <%-JSON.stringify(settings.randomVersionString)%>,
};

// Allow other frames to access this frame's modules.
window.require = __webpack_require__;
window.require.resolve = __webpack_require__.resolve;
window.require.cache = __webpack_module_cache__;
window.require.resolveTmp = require.resolve('ep_etherpad-lite/static/js/pad_cookie');

const basePath = new URL('..', window.location.href).pathname;
window.$ = window.jQuery = require('../../src/static/js/rjquery').jQuery;
window.browser = require('../../src/static/js/vendors/browser');
Expand Down

0 comments on commit 91b2203

Please sign in to comment.