weave-gitops icon indicating copy to clipboard operation
weave-gitops copied to clipboard

Export node module as esm

Open jpellizzari opened this issue 3 years ago • 4 comments

Closes #1916

Makes https://github.com/weaveworks/weave-gitops/pull/1917 irrelevant.

Has better support by consuming tooling to "pass through" assets like svgs

jpellizzari avatar May 13 '22 15:05 jpellizzari

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).

foot avatar May 13 '22 16:05 foot

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).

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.

jpellizzari avatar May 13 '22 16:05 jpellizzari

Is there anything we need to do enterprise-side before we merge this, or can I just merge it?

ozamosi avatar Jun 06 '22 15:06 ozamosi

I think this needs to be merged first?: https://github.com/weaveworks/weave-gitops-enterprise/pull/755

jpellizzari avatar Jun 15 '22 17:06 jpellizzari

Closing as stale, I will take another crack at this once https://github.com/weaveworks/weave-gitops-enterprise/pull/2543 gets merged

jpellizzari avatar Mar 15 '23 15:03 jpellizzari