diff --git a/{{cookiecutter.github_project_name}}/src/plugin.ts b/{{cookiecutter.github_project_name}}/src/plugin.ts index 900c125..b75f43c 100644 --- a/{{cookiecutter.github_project_name}}/src/plugin.ts +++ b/{{cookiecutter.github_project_name}}/src/plugin.ts @@ -7,8 +7,6 @@ import { Widget } from '@phosphor/widgets'; import { IJupyterWidgetRegistry } from '@jupyter-widgets/base'; -import * as widgetExports from './widget'; - import { MODULE_NAME, MODULE_VERSION } from './version'; const EXTENSION_ID = '{{ cookiecutter.npm_package_name }}:plugin'; @@ -37,6 +35,6 @@ function activateWidgetExtension( registry.registerWidget({ name: MODULE_NAME, version: MODULE_VERSION, - exports: widgetExports, + exports: () => import('./widget'), }); } diff --git a/{{cookiecutter.github_project_name}}/tsconfig.json b/{{cookiecutter.github_project_name}}/tsconfig.json index f143a55..286559e 100644 --- a/{{cookiecutter.github_project_name}}/tsconfig.json +++ b/{{cookiecutter.github_project_name}}/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "esModuleInterop":true, "lib": ["es2015", "dom"], - "module": "commonjs", + "module": "esnext", "moduleResolution": "node", "noEmitOnError": true, "noUnusedLocals": true,