Module not found: Error: Package path ./extensionsJSM/DrawCommandHandler is not exported from package

Hi,

just upgraded to latest 2.3.16, and I can’t import extensions anymore in an app that’s built with webpack

import { DrawCommandHandler } from 'gojs/extensionsJSM/DrawCommandHandler';

Vadim

We have always recommended that you copy extension source files into your project rather than depending on trying to import them from “gojs/extensionsJSM/…”.

I’m surprised that it worked before. What is the error now?

The error now, is in first comment. And yes after upgrading to 2.3.16 I had to copy paste locally the extension in order to get rid of the error. Before 2.3.16, was just fine importing, the package exporters have messed up previous imports.

I’m not a fan of copy pasting extensions since they can modify also, and in each upgrade we need to make a diff and see if something has changed or not…otherwise with imports is easier, we just track the release changes fo chages…Not so important, but maybe is better to add extensions to package exports too ? Anyhow I noticed in 3.0 beta you moved them in a independent package…so maybe won’t be an issue anymore once we get to 3.x

I don’t see any error message in either of your posts.

Yes, it should be better in v3, where all of the modules import from “gojs” rather than from the relative path ../release/go-module.js

Ah sorry, error is in title of this thread :)…alright, going with copy/paste locally and waiting for v3. Thank you.