Reproduce Parcel bug #9414
This repo is a minimal reproduction of a bug in Parcel v2.10.3.
- Clone this repo
- Run
npm install
using Node.js v18+ - Run
npm start
- Open https://localhost:8080 in your browser
- Open the browser's console
You should see the following error:
Uncaught SyntaxError: The requested module './dist/my-counter.js' does not provide an export named 'MyCounter'
There should be a named export MyCounter
in the generated file dist/my-counter.js
so that it can be imported like this:
import { MyCounter } from './dist/my-counter.js';
In the generated file dist/my-counter.js
there is no export
statement for the MyCounter
class.
On the other hand, in the dist/my-counter-defined.js
file there is a named export for the MyCounter
class.