Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom bundle doesn't generate CSS file anymore. #7258

Open
SolidTux opened this issue Oct 31, 2024 · 6 comments
Open

Custom bundle doesn't generate CSS file anymore. #7258

SolidTux opened this issue Oct 31, 2024 · 6 comments
Assignees
Labels
bug something broken P2 considered for next cycle

Comments

@SolidTux
Copy link

When generating a custom bundle, no CSS file is generated any more, even though it's mentioned in the output.

Steps to reproduce

$ git clone https://github.com/plotly/plotly.js.git
$ cd plotly.js
$ git checkout e6b155c1c91603eb0946f111bc3415b222422230
$ npm install
$ npm run custom-bundle -- --traces sunburst --transforms none --strict --out sunburst
> [email protected] custom-bundle
> node tasks/custom_bundle.mjs --traces sunburst --transforms none --strict --out sunburst

{
  traceList: [ 'scatter', 'sunburst' ],
  name: 'sunburst',
  index: '/users/tkm/dhauck/kekse/plotly.js/lib/index-strict-sunburst.js',
  strict: true,
  dist: '/users/tkm/dhauck/kekse/plotly.js/dist/plotly-sunburst.js',
  distMin: '/users/tkm/dhauck/kekse/plotly.js/dist/plotly-sunburst.min.js'
}

  dist/plotly-sunburst.min.js    1.0mb ⚠️
  dist/plotly-sunburst.min.css  63.9kb

⚡ Done in 750ms

This results in the following extra files being generated:

$ git clean -dxn
Would remove dist/plotly-sunburst.min.js
Would remove lib/index-strict-sunburst.js
Would remove node_modules/
@SolidTux
Copy link
Author

SolidTux commented Oct 31, 2024

It looks like it was introduced in commit e7f5748:

e7f57483127df5747669ba46d0a033e5fd54cdef is the first bad commit
commit e7f57483127df5747669ba46d0a033e5fd54cdef
Author: Mojtaba Samimi <[email protected]>
Date:   Wed Oct 30 17:20:28 2024 -0400

    remove unused empty css files

 tasks/util/bundle_wrapper.mjs | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

So either the output claiming it's 64 kB is wrong or the file gets wrongly deleted.

@gvwilson gvwilson added bug something broken P2 considered for next cycle labels Oct 31, 2024
@gvwilson
Copy link
Contributor

@archmoj please have a look when you can and let us know if the problem is output or deletion

@archmoj
Copy link
Contributor

archmoj commented Nov 5, 2024

The CSS outputs were empty and removed.
@SolidTux Do you have any use case for it?

@SolidTux
Copy link
Author

SolidTux commented Nov 7, 2024

No, I realized that it works without the CSS now. But the output of the tool is still incorrect, right? The output isn't 64kB.

@archmoj
Copy link
Contributor

archmoj commented Nov 7, 2024

No, I realized that it works without the CSS now. But the output of the tool is still incorrect, right? The output isn't 64kB.

Yes. It looks like a esbuild bug.

@archmoj archmoj closed this as completed Nov 7, 2024
@gvwilson
Copy link
Contributor

gvwilson commented Nov 7, 2024

@archmoj do you think this is a bug in esbuild itself or in the way we're using it? i.e., is it their problem or ours? thx - @gvwilson

@gvwilson gvwilson reopened this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P2 considered for next cycle
Projects
None yet
Development

No branches or pull requests

3 participants