-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Npm package Aliases doesnt work on custom plugins #3178
Comments
Instead of doing the the direct imports, an easier short term solution is to copy the related aliases part of the main package.json to your custom plugin's file. |
I was thinking that this could possibly be fixed by syncing the aliases automatically with |
I dont know how is done the build in reaction, but it is an alias in the js processor (like aliases in webpack). |
The solution is to move things that custom plugins need to actual NPM packages. Separate issues should be filed for anything specific that anyone comes across while creating custom plugins. |
Expected behavior
Same way to include reaction imports on my custom plugin,.
I think if this cant be fixed at least we need clear documentation on how to do it or an advice.
Actual behavior
Aliases on reaction package.json doesnt propagate to my custom plugin, if i am using package,json in my custom plugin.
So I need to replace
import { registerComponent } from "@reactioncommerce/reaction-components";
withimport { registerComponent } from "/imports/plugins/core/components/lib";
Steps to reproduce the behavior
Create a new plugin with npm dependencies
And the make an import and @reactioncommerce aliases doesnt work.
Versions
The text was updated successfully, but these errors were encountered: