Open marcofugaro opened 2 years ago
Any update on this?
This issue currently prevents us from importing nested foo/bar/baz
modules[^1]:
[^1]: for instance any three/addons/**/*
modules
import baz from 'https://cdn.skypack.dev/mypackage@1.2.3/foo/bar/baz.js'
despite package.json
.exports
rule being set:
"./foo/*": "./foo/*"
--
As a workaround, we could of course add:
"./foo/*": "./foo/*"
"./foo/bar/*": "./foo/bar/*"
but this become not realistic when many foo/*
folders OR many deep-nested folders foo/**/*
Given the following exports field in a library package.json:
The following link will work:
https://cdn.skypack.dev/example@1.0.0/features/TestFeature.js
However the following link will default to
raw
mode:https://cdn.skypack.dev/example@1.0.0/features/awesomeFeature/TestFeature.js
This does not match the Node.js behaviour, since as you can see from the docs:
It would be ideal if the
imports
mode would work on nested exports as well.This is breaking skypack usage with the current three.js version: see #261
You can test the behaviour with this link: https://cdn.skypack.dev/three@0.137.5/examples/jsm/controls/OrbitControls.js
Related also to #249