We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9856cf5 commit 4b4ffecCopy full SHA for 4b4ffec
src/index.ts
@@ -52,7 +52,7 @@ async function readOptions<
52
assert(pkg, 'Could not find package.json');
53
let main: string = pkg.packageJson.main || 'src/index.ts';
54
if (finalOptions.codepath === 'src') {
55
- main = main.replace(/^(\.?\/?)build\//, '$1src/').replace(/\.js$/, '.ts');
+ main = main.replace(/^(\.?\/?)(build|dist)\//, '$1src/').replace(/\.js$/, '.ts');
56
}
57
if (!factory) {
58
const finalPath = path.resolve(rootDirectory, main);
0 commit comments