Import (via @JsModule) from node_modules vs frontend folder

I’m still trying to write a Web Component and Java wrapper for a jQuery-based widget.

@NpmPackage(value = "jquery", version = "3.6.3")
@NpmPackage(value = "@types/jquery", version = "3.5.16")
@NpmPackage(value = "summernote", version = "0.8.20")
@JsModule("summernote/dist/summernote-lite.js")

Having the widget downloaded and imported from node_modules works fine, but I need to make changes to the .js file. So I copied everything from node_modules/summernote/dist/ to src\main\resources\META-INF\resources\frontend/summernote.
But when I switch to

@JsModule("./summernote/summernote-lite.js")

it seems (parts of) of Summernote can’t find jQuery anymore.
Any ideas what I might be doing wrong here?
image.png

The frontend build does not look for files in src\main\resources\META-INF\resources\frontend/summernote. You’ll want to move it to /frontend/summernote instead.

META-INF\resources\ is published as a static folder in the deployed app

From what I know that’s exactly where these files go in an add-on. And these folders all get copied to frontend\generated\jar-resources in the application that uses the add-ons. And imports like @JsModule("./components/mycomponent.ts") do successfully look in that folder. The error is different if it can’t even find summernote, so it clearly can. But somehow summernote can’t import jQuery (that’s what the error means from my limited understanding) when its loaded from the frontend folder, but it works when its loaded from node_modules. So there must be some difference here how modules are loaded/imported.

Sorry, I missed that you’re building an add-on.