Skip to content

Commit

Permalink
update shims for new package layouts
Browse files Browse the repository at this point in the history
new subpackages and things that aren't needed
  • Loading branch information
minrk committed Aug 6, 2019
1 parent b3bf040 commit 4d95006
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions webpack.config.js
Expand Up @@ -18,6 +18,11 @@ module.exports = {
publicPath: "https://unpkg.com/thebelab@" + pkg.version + "/lib/",
},
plugins: [
// get slim jQuery
new webpack.NormalModuleReplacementPlugin(
/jquery$/,
"jquery/dist/jquery.slim.js"
),
// Not using moment
shim(/moment/),
// Don't need vim keymap
Expand All @@ -27,24 +32,39 @@ module.exports = {
shim(/elliptic/),
shim(/bn\.js/),
shim(/readable\-stream/),
// can we get away without react-dom?
shim(/react\-dom/),
// skip postcss
shim(/postcss/),
shim(/font\-awesome/),
// shim(/ajv/),
// shim(/lodash/),
// shim(/@phosphor\/coreutils\/lib\/random/),
// shim out some unused phosphor
shim(
/@phosphor\/widgets\/lib\/(commandpalette|box|dock|grid|menu|scroll|split|stacked|tab).*/
/@phosphor\/widgets\/lib\/(box|commandpalette|contextmenu|dock|grid|menu|scroll|split|stacked|tab).*/
),
shim(/@phosphor\/collections\/lib\/(bplustree).*/),
shim(/@phosphor\/(dragdrop|commands).*/),

// unused @jupyterlab
shim(/@jupyterlab\/apputils/),
// shim(/@jupyterlab\/apputils\/lib\/(clientsession|dialog|mainmenu|instancetracker|sanitizer|toolbar)/),
// shim(/@jupyterlab\/apputils/),
shim(
/@jupyterlab\/apputils\/lib\/(clientsession|dialog|instancetracker|mainareawidget|mainmenu|thememanager|toolbar|widgettracker)/
),
// shim(/@jupyterlab\/apputils\/style\/.*/),

// JupyterLab's codemirror package is also big,
// but not so trival to shim
// we only need CodeMirrorEditor.defaultConfig to be defined, as far as I can tell
// shim(/@jupyterlab\/codemirror\/lib\/editor/),
shim(/@jupyterlab\/codeeditor\/lib\/jsoneditor/),
shim(/@jupyterlab\/coreutils\/lib\/(time|settingregistry|.*menu.*)/),
shim(/@jupyterlab\/services\/lib\/(contents|terminal)\/.*/),
shim(/@jupyterlab\/statusbar\/.*/),
shim(/@jupyterlab\/theme-light-extension\/style\/(icons|images)\/.*/),
shim(/@jupyterlab\/theme-light-extension\/style\/(urls).css/),

new BundleAnalyzerPlugin({
analyzerMode: "static",
openAnalyzer: false,
Expand Down

0 comments on commit 4d95006

Please sign in to comment.