fusionjs / fusion-cli

Migrated to https://github.com/fusionjs/fusionjs
MIT License
140 stars 37 forks source link

Use webpack native json behavior for loading json files via assetUrl #745

Closed micburks closed 5 years ago

rtsao commented 5 years ago

Unless I'm mistaken, I think we should be able to remove json-loader.js entirely since this is built into webpack 4?

Since this is a breaking change, we should figure out how we will want to ship this (potentially codemods?) and if there's any other breaking changes we want to make in v2 before releasing this.

micburks commented 5 years ago

@rtsao I thought so too, but removing it entirely doesn't seem to work with json files that were added to the build via assetUrl

rtsao commented 5 years ago

Ah, I see, it must be taking precedence over file-loader?

micburks commented 5 years ago

The comment in the json-loader also mentioned this would be a breaking change, but I haven't been able to identify how this breaks for a consumer. The only effect should be that unused keys should be removed from the client-main build. Am I missing something?

rtsao commented 5 years ago

After comparing webpack v3 and v4 behavior, I think you are right -- there is no breaking change. I recall looking into this earlier and there was some different behavior regarding default exports, but maybe I was mistaken or this has changed in the meantime.

micburks commented 5 years ago

!merge

old-fusion-bot[bot] commented 5 years ago

Triggered Fusion.js build verification: https://buildkite.com/uberopensource/fusion-release-verification/builds/1770