-
Notifications
You must be signed in to change notification settings - Fork 293
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
Support multiple entry inputs #410
Conversation
@guybedford The WARL pr looks good, lets bump the dependency here. |
Ok the fix turned out to be vercel/webpack-asset-relocator-loader#44, as soon as that is merged, I can bump the asset loader here. |
I've also added the feature to this PR to support multiple entry points in the CLI via: ncc build input1.js input2.js -o dist |
d073c16
to
e1aefeb
Compare
Codecov Report
@@ Coverage Diff @@
## master #410 +/- ##
==========================================
- Coverage 74.68% 73.65% -1.03%
==========================================
Files 13 13
Lines 395 391 -4
==========================================
- Hits 295 288 -7
- Misses 100 103 +3
Continue to review full report at Codecov.
|
}); | ||
} | ||
else if (typeof entry === 'string') { | ||
processedEntry['index.js'] = pathResolve(entry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
processedEntry['index.js'] = pathResolve(entry); | |
processedEntry[entry] = pathResolve(entry); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can change the default to the basename, but the default filename for any string value input right now is index.js
.
Co-Authored-By: Steven <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok looks good. Let's release another beta.
This reverts commit ddaf55a.
This implements #113 supporting an object form for
entry
:where the separate entry points will have shared chunks and therefore shared dependency instances meaning any shared dependency state will be maintained as shared state between the entry points (no more instancing issues!).
In addition
filename
supports the Webpack[name]
patterns now.I also changed the output API to support this to an object with an
output
property (this is what we did in Rollup!), where the output is an object mapping file path strings to file entries or symlinks:I'm not fixed to this API thought at all, so please do share your feedback on this if you think any variations may be better.
This PR is passing all tests tests when combined with the PR at vercel/webpack-asset-relocator-loader#43, and vercel/webpack-asset-relocator-loader#44.
Closes #113