-
Notifications
You must be signed in to change notification settings - Fork 19
Update jupyterlite and enable file-system access #27
Conversation
+ Use comlink
@bollwyvl May I kindly ask some help on the webpack+worker setup? Webpack seems to not be processing the worker content properly when it comes to importing comlink and drivefs in the worker. It fails with
Webpack generates the following code: /******/ (() => { // webpackBootstrap
/******/ "use strict";
/******/ var __webpack_modules__ = ({
/***/ "./lib/worker.js":
/*!***********************!*\
!*** ./lib/worker.js ***!
\***********************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var comlink__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! comlink */ "webpack/sharing/consume/default/comlink/comlink");
/* harmony import */ var comlink__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(comlink__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _jupyterlite_contents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @jupyterlite/contents */ "webpack/sharing/consume/default/@jupyterlite/contents/@jupyterlite/contents");
/* harmony import */ var _jupyterlite_contents__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_jupyterlite_contents__WEBPACK_IMPORTED_MODULE_1__);
// Copyright (c) Thorsten Beier
// Copyright (c) JupyterLite Contributors
// Distributed under the terms of the Modified BSD License. Weirdly, in JupyterLite, the way you set things up it does not generate something so similar: "use strict";
(self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] = self["webpackChunk_JUPYTERLAB_CORE_OUTPUT"] || []).push([["packages_pyolite-kernel_lib_worker_js"],{
/***/ 88289:
/*!************************************************!*\
!*** ../packages/pyolite-kernel/lib/worker.js ***!
\************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "PyoliteRemoteKernel": () => (/* binding */ PyoliteRemoteKernel)
/* harmony export */ });
/* harmony import */ var _jupyterlite_contents__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @jupyterlite/contents */ 39694);
// Copyright (c) Jupyter Development Team.
// Distributed under the terms of the Modified BSD License. Do you know what I could be missing? I tried using the worker-loader manually but failed to... I don't understand what you've done differently in JupyterLite when doing this. |
Nevermind @bollwyvl, @trungleduc was able to help me. For some reason, adding a separate webpack setup for the worker fixes it. Starting to have drive support in xeus-python as well 💯 |
@martinRenou does it work to have a some |
I've had fairly poor luck with ts-loader in the past, but glad that it's
working out.
|
@DerThorsten idk! But we should definitely try that and see if that works. @bollwyvl yeah.. I'd like to get rid of the TS-loader before merging. We should not need it. |
@DerThorsten <https://github.com/DerThorsten> idk! But we should
definitely try that and see if that works.
And we get a shiny penny if alternative loaders like importnb work!
… |
Relative imports does work indeed! |
Jeah,you are right, relative imports are the proper thing in this case |
Also use comlink for the worker communication, like jupyterlite does with Pyolite.
Fixes #26