File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -88,8 +88,6 @@ async function buildPackage(outDir: string): Promise<void> {
88
88
extension : '.js' ,
89
89
} ) ;
90
90
91
- const devHelper = path . join ( outDir , 'dev/index.js' ) ;
92
-
93
91
for ( const prodFile of emittedTSFiles ) {
94
92
const { dir, base } = path . parse ( prodFile ) ;
95
93
@@ -99,7 +97,7 @@ async function buildPackage(outDir: string): Promise<void> {
99
97
100
98
if ( ext === 'js.map' ) {
101
99
continue ;
102
- } else if ( prodFile === devHelper ) {
100
+ } else if ( path . basename ( dir ) === 'dev' ) {
103
101
packageJSON . exports [ './dev' ] = './dev/index.js' ;
104
102
continue ;
105
103
}
@@ -110,7 +108,8 @@ async function buildPackage(outDir: string): Promise<void> {
110
108
`${ dir } /${ name } ` ,
111
109
) ;
112
110
113
- const lines = ext === 'd.ts' ? [ ] : [ `import '${ relativePathToProd } /dev';` ] ;
111
+ const lines =
112
+ ext === 'd.ts' ? [ ] : [ `import '${ relativePathToProd } /dev/index.js';` ] ;
114
113
lines . push (
115
114
`export * from '${ relativePathToProd } /${ relativePathAndName } .js';` ,
116
115
) ;
You can’t perform that action at this time.
0 commit comments