Niklas Mischkulnig
Niklas Mischkulnig
That file is correctly published: https://unpkg.com/browse/@parcel/[email protected]/lib/public/Environment.js So try deleting node_modules and rerunning npm
Please post the full error, there's more in that terminal window if you scroll up. It's something about the native sourcemap module
> I see a fair amount of quick solutions here, but I spent a lot of time on my tsconfig and just do not want to switch away. It kind...
> Guarding the import like obviously produces the desired result. To explain what's going on here: For better tree shaking, Parcel treats ```js import * as other from './other.js'; console.log(other.foo);...
I'm not even sure where that decision to not include node_modules happens in the first place https://github.com/parcel-bundler/parcel/blob/cbc84b0c1d538b0ec15a3bf01f95da3ed623ebbb/packages/transformers/typescript-types/src/TSTypesTransformer.js#L43-L53 Might also be related to a `"include": ["src/**/*"]` in tsconfig
Happens consistently for me with the minimal reproduction: https://github.com/mischnic/parcel-issue-5683 For `dist/a.html`, the script tags for the shared bundles are added in the wrong order. > I can't figure out how...
I've bisected the commits, this is a regression of https://github.com/parcel-bundler/parcel/pull/5200.
A workaround is not using a file that is imported in some other place as a `` directly. So instead of this https://github.com/cubing/cubing.js/blob/afa6e5b9379e8b9549769ec0cea4615a87c80a73/src/demo/twisty/2d-ll-stickering.html#L7 adding a `2d-ll-stickering.js` file with `import "../../cubing/twisty/index.ts"`...
That bug should be fixed though
The "pkg#types" mechanism is implemented internally as just an additional target. So if you override which targets run by setting `--target static`, you'll need to add `--target types` as well.