Any way to apply the `common.js` to one of the entry files?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- build-system, tooling
Research direction
Start by reading the Factor-Bundle and Browserify bundling behavior for the entry files main.js, sub-app1.js, and sub-app2.js, focusing on how common.js is emitted. Determine whether the requested output can be supported without rebundling generated files; done means main.js includes the common requirements while the sub-app bundles retain only their unique code.
Written by the indexing model from the issue text.
Description
I'm using Factor-Bundle with Browserify to generate multiple partial bundles and a larger common.js file with all of the common requirements. However, one of the partial bundles corresponds to my main entrypoint, main.js which I would actually like to contain all of common.js so that I have one main file with all the common JS and the main contents of my app, and then the other partial bundles correspond to sub-apps.
To clarify, I am trying to go from these entry points:
main.jssub-app1.jssub-app2.js
to this:
main.js(INCLUDING ALL COMMON REQUIREMENTS)sub-app1.js(only code and require()s unique to sub-app1)sub-app2.js(only code and require()s unique to sub-app2)
But Factor-Bundle gives me:
common.js// <- can I merge this with main.js somehow???main.jssub-app1.js//goodsub-app2.js//good
Unless there's some hidden option in Browserify or Factor-Bundle to generate them how I want, my next guess is there might be some Browserify function that would simply let me merge two generated packages back into one? I can't simply browserify.bundle(common.js, main.js) after the fact because those bundled files are in different locations and I get errors that it can't locate the relative file paths anymore.
Any ideas?
- Dominant language
- JavaScript
- Stars
- 397
- Forks
- 24
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from browserify/factor-bundle
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
browserify/factor-bundle#94 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
browserify/factor-bundle#92 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
browserify/factor-bundle#83 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
browserify/factor-bundle#82 · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 30/100
browserify/factor-bundle#81 · 2 comments ·
All issues in browserify/factor-bundle
Similar issues
-
bot:ai-assisted component:compact-js status:untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
midnightntwrk/midnight-sdk#403 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
DavidAnson/markdownlint-cli2#940 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
githubnext/gh-aw-workshop#3692 ·
-
agent/guide documentation hive/hosted-available-lke648397-260827-5n31
Difficulty 2/5 1-3 hours Newbie friendliness 90/100