Giter Site home page Giter Site logo

Comments (6)

CorentinDoue avatar CorentinDoue commented on June 1, 2024 1

Awesome, I need this!

from rollup-plugin-visualizer.

btd avatar btd commented on June 1, 2024

Hi, thank you for issue and implementation. I like the idea but i cannot merge it. I maintain master copy of UI in rollup plugin and copy implementation from time to time to this package as it is not dependent from bundler.

If i start to merge PR there i will not be able to sync it. not with my limited capacity to maintain both plugins.

It would be nice if you can copy you PR against rollup plugin. If not i can eventually copy your changes.

from rollup-plugin-visualizer.

guillaumeduboc avatar guillaumeduboc commented on June 1, 2024

Hey @btd, I looked into simply copying the PR to the rollup plugin but I think it won't be sufficient.
It seems the tree built from the esbuild and rollup outputs are not the same (for node_modules/d3-hierarchy/src/ for example). Hence, my compute is not complete and imports are not tracked correctly in the rollup plugin

After a bit of deep diving, here's what I found :
Rollup doesn't have the same values in its outputBundle than esbuild in its metadata.outputs

for example for the treemap bundle, esbuild will list node_modules/d3-hierarchy/src/index.js in the outputs but roolup will ignore this file from its outputsBundle

Because of this, the rollup plugin data has a missing piece to track which file imports a module. That link would normally be the node_modules/d3-hierarchy/src/index.js. Do you have an idea to get around this problem ?

from rollup-plugin-visualizer.

guillaumeduboc avatar guillaumeduboc commented on June 1, 2024

Here is the outputBundle for the rollup plugin

output-bundle.json

you can see that there is no moduleId for the /user/rollup-plugin-visualizer/node_modules/d3-hierarchy/src/index.js file but /user/rollup-plugin-visualizer/src/treemap/index.tsx specifies it in its importedIds (in the moduleInfos)

from rollup-plugin-visualizer.

btd avatar btd commented on June 1, 2024

Thanks for understanding, i will take a look

from rollup-plugin-visualizer.

btd avatar btd commented on June 1, 2024

Blocked by #183

from rollup-plugin-visualizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.