Allow symlinks during webpack build #33517
Merged
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.
Make sure that symlinked node_modules are properly handled by webpack in case of using
npm link
.There is currently one issue during the watch with
@nextcloud/vue
where it cannot resolve jquery which tributejs is pulling in which then cannot be resolved as the parent node modules of@nextcloud/vue
do not contain it. This is only an issue if components that use the rich content editor and only during linking as in other cases the jquery dependency would be found in the server node_modules. As a fix we could add jquery to the vue library as a dependency, which shouldn't matter in terms of building as those are marked as external anyways.While tribute.js doesn't require query it checks for its presence which webpack is trying to fill through the ProvidePlugin:
https://github.com/nextcloud/server/blob/master/webpack.common.js#L144
This causes the following tribute.js code to fail then as it tires to resolve it from the linked path: