File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,11 @@ export class SCSSNavigation extends CSSNavigation {
7979 const subpath = bareTarget . substring ( moduleName . length + 1 ) ;
8080 if ( packageJson . exports ) {
8181 if ( ! subpath ) {
82- const dotExport = packageJson . exports [ '.' ] ;
82+ // exports may look like { "sass": "./_index.scss" } or { ".": { "sass": "./_index.scss" } }
83+ const rootExport = packageJson . exports [ "." ] || packageJson . exports ;
8384 // look for the default/index export
8485 // @ts -expect-error If ['.'] is a string this just produces undefined
85- const entry = dotExport && ( dotExport [ 'sass' ] || dotExport [ 'style' ] || dotExport [ 'default' ] ) ;
86+ const entry = rootExport && ( rootExport [ 'sass' ] || rootExport [ 'style' ] || rootExport [ 'default' ] ) ;
8687 // the 'default' entry can be whatever, typically .js – confirm it looks like `scss`
8788 if ( entry && entry . endsWith ( '.scss' ) ) {
8889 const entryPath = joinPath ( modulePath , entry ) ;
You can’t perform that action at this time.
0 commit comments