Переглянути джерело

Merge pull request #9300 from jasongrout/shareext

Require 'package' instead of 'package/' so webpack activates sharing
Steven Silvester 4 роки тому
батько
коміт
8b2c21f874
1 змінених файлів з 4 додано та 2 видалено
  1. 4 2
      dev_mode/index.js

+ 4 - 2
dev_mode/index.js

@@ -149,7 +149,8 @@ async function main() {
   const mimeExtensions = [];
   {{#each jupyterlab_mime_extensions}}
   try {
-    for (let plugin of activePlugins(require('{{@key}}/{{this}}'))) {
+    let ext = require('{{@key}}{{#if this}}/{{this}}{{/if}}');
+    for (let plugin of activePlugins(ext)) {
       mimeExtensions.push(plugin);
     }
   } catch (e) {
@@ -172,7 +173,8 @@ async function main() {
   // Handled the registered standard extensions.
   {{#each jupyterlab_extensions}}
   try {
-    for (let plugin of activePlugins(require('{{@key}}/{{this}}'))) {
+    let ext = require('{{@key}}{{#if this}}/{{this}}{{/if}}');
+    for (let plugin of activePlugins(ext)) {
       register.push(plugin);
     }
   } catch (e) {