It looks like 0.4.4 did break some defaults for index.ts
Get Could not find file error
$ pwd
/Users/me/Dev/temp/sample
$ microbundle -v
microbundle, 0.4.4
$ microbundle
Error: Could not find file: '/Users/me/Dev/temp/sample/src/index.ts'.
$ ./node_modules/.bin/microbundle -v
microbundle, 0.4.3
$ ./node_modules/.bin/microbundle
Build output to dist:
1.86 kB: sample.js
1.86 kB: sample.esm.js
1.92 kB: sample.umd.js
{
"name": "sample",
"version": "0.0.1",
"main": "dist/sample.js",
"jsnext:main": "dist/sample.esm.js",
"module": "dist/sample.esm.js",
"dev:main": "dist/sample.dev.js",
"minified:main": "dist/sample.min.js",
"devDependencies": {
"microbundle": "0.4.3"
}
}
Hi @molszanski - where is your entry file located? src/index.ts?
Yes, 'src/index.ts'.
@molszanski does adding a source field to your package.json fix it?
"source": "src/index.ts",
I'm in the same situation, too.
with microbundle 0.4.4, my index.ts is not found. I've added source field but doesn't work well.
Could u share your repositories? I've just created a sample for testing and it works for me.
I have no idea, but currently, it is solved after a lot of try-and-error. Sorry, I cannot create a repro.
@molszanski maybe you could provide a repro for this? If not I'd have to close this until someone comes up with a repro case that we could use to fix it.
Will look at it again during the week and share the repo
@Andarist, @lacolaco, @developit.
Hi guys! Sorry for taking that long.
I've found the culprit and moved the project to 0.4.4.
It was the tsconfig.json, which had a wrong file declaration out there.
I've removed the "files" section altogether and that had basically fixed it
Thanks for reaching back to us, as you have fixed the issue I'm going to close this :)
Most helpful comment
Thanks for reaching back to us, as you have fixed the issue I'm going to close this :)