fix: vendor hexoid until v2 is released#978
Closed
icholy wants to merge 1 commit intonode-formidable:masterfrom
Closed
fix: vendor hexoid until v2 is released#978icholy wants to merge 1 commit intonode-formidable:masterfrom
icholy wants to merge 1 commit intonode-formidable:masterfrom
Conversation
|
Would be a great addition, the hexoid issue is very annoying with webpack. @GrosSacASac thoughts? As a current workaround I am using a local master build of And then patching Works but not ideal :) |
Contributor
Author
|
@mobeigi there's a simpler work-around: module.exports = {
// ...
resolve: {
alias: {
hexoid: path.resolve(__dirname, 'node_modules/hexoid/dist/index.js'),
},
}
}; |
|
@icholy That approach gives me build warnings when doing a production next.js build (although I am using latest canary builds etc). The patch approach does not. Ideally though your PR is merged in and this solves the problem easily for everyone. 🙏 |
Contributor
Author
|
lukeed/hexoid#7 v2 of hexoid has been released. |
Contributor
Author
|
Closing in favor of #981 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem:
The v1.0.0 release of hexoid is incompatible with webpack.
main.js
webpack.config.js
Output:
Root Cause:
Webpack prefers the
moduleentry over themainentry inpackage.jsonby default, buthexoidexports incompatible APIs between the commonjs & esm modules. The esm module uses adefaultexport which is not equivalent to themodule.exportsassignment in the commonjs module.Solution 1:
The hexoid repo has fixed the inconsistency in their
masterbranch, but haven't published a release in 4 years. I've requested a v2 be published with the new exports. Once this happens, we can upgrade to that: lukeed/hexoid#7Solution 2:
In the meantime, I propose that we vendor the
hexoidcode as a helper function.