Allow compressed dependencies

Open
#402 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Stale
Tech stack
r, webpack
Domain
frontend, web-dev

Research direction

Read R/utils.R at lines 39-46 and trace how htmlwidgets discovers JavaScript dependencies. Confirm how the current lookup handles .js files, then verify that compressed .js.gz dependencies are also recognized; done means both extensions can be discovered without breaking existing behavior.

Written by the indexing model from the issue text.

Description

Hi! Thanks for the fantastic package. I've been building a htmlwidget, and am now trying to optimize bundle size. I am using reactR, and creating my widget dependency with webpack. I'm trying to use a webpack compression plugin.

My dependency is much smaller, but now is a .js.gz file, which doesn't get discovered by htmlwidgets. Would it be possible to update this function to look for a .js file or a .js.gz file?

https://github.com/ramnathv/htmlwidgets/blob/31dd9451f454de75dac78dd9f2d1bd9e87c27a60/R/utils.R#L39-L46

Dominant language
R
Stars
801
Forks
202
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ramnathv/htmlwidgets

All issues in ramnathv/htmlwidgets

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.