Export node module as esm
Closes #1916
Makes https://github.com/weaveworks/weave-gitops/pull/1917 irrelevant.
Has better support by consuming tooling to "pass through" assets like svgs
The top level module field is there to signal to module consumers that its esm. The ./index.js lines up w/ ./dist/index.js once the package.json is copied into the dist folder.
I did not actually test npm start / npm run build with that change. The top level module field might change some local behaviour in parcel, if so we could force it back w/ more options in the default target (outputFormat).
The top level
modulefield is there to signal to module consumers that its esm. The./index.jslines up w/./dist/index.jsonce the package.json is copied into the dist folder.I did not actually test
npm start/npm run buildwith that change. The top levelmodulefield might change some local behaviour in parcel, if so we could force it back w/ more options in thedefaulttarget (outputFormat).
Tested builds and dev on this branch and it works; I wouldn't expect changes to the lib target to cause issues with the main build.
Is there anything we need to do enterprise-side before we merge this, or can I just merge it?
I think this needs to be merged first?: https://github.com/weaveworks/weave-gitops-enterprise/pull/755
Closing as stale, I will take another crack at this once https://github.com/weaveworks/weave-gitops-enterprise/pull/2543 gets merged