You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
options: {modules: {three: {// nothing, but need this empty object literal},},},
the build has an error:
Module not found: Error: Package path ./LinearMipmapLinearFilter is not exported from package /home/trusktr/src/lume+lume/node_modules/three (see exports field in /home/trusktr/src/lume+lume/node_modules/three/package.json)
Besides that Webpack is trying to obey exports field, it is also trying to import the wrong path. three/LinearMipmapLinearFilter is not the file where that thing comes from; it comes from three/src/constants.
I wonder if there's a way to make it correctly detect the path of items.
The text was updated successfully, but these errors were encountered:
trusktr
changed the title
feature request: detection of component path
feature request: better detection of component path
Apr 24, 2022
I took a look! I see it is using TS for the AST. Maybe instead we can tell TS to resolve the original file location of given item, to get the path that way.
Here for example is a Three.js component that imports everything from an index, importing the whole Three.js lib:
https://github.com/mrdoob/three.js/blob/f9331aa74f87b12e91f34886e0ed54b8d79b31bf/examples/jsm/controls/OrbitControls.js#L1-L9
When I try to set the loader config,
the build has an error:
Besides that Webpack is trying to obey
exports
field, it is also trying to import the wrong path.three/LinearMipmapLinearFilter
is not the file where that thing comes from; it comes fromthree/src/constants
.I wonder if there's a way to make it correctly detect the path of items.
The text was updated successfully, but these errors were encountered: