Skip to content

Commit 4b4ffec

Browse files
committed
fix(loader): allow dist and build output directories
1 parent 9856cf5 commit 4b4ffec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function readOptions<
5252
assert(pkg, 'Could not find package.json');
5353
let main: string = pkg.packageJson.main || 'src/index.ts';
5454
if (finalOptions.codepath === 'src') {
55-
main = main.replace(/^(\.?\/?)build\//, '$1src/').replace(/\.js$/, '.ts');
55+
main = main.replace(/^(\.?\/?)(build|dist)\//, '$1src/').replace(/\.js$/, '.ts');
5656
}
5757
if (!factory) {
5858
const finalPath = path.resolve(rootDirectory, main);

0 commit comments

Comments
 (0)