-
-
Notifications
You must be signed in to change notification settings - Fork 866
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
Expose resolveApp for plugins #1209
Comments
we have to create 2 APIs so with that
|
Don't quite get what you mean. I just meant export resolveApp. But what is your idea? 😀 |
I saw in multiple issues people want to access some paths in so I'm thinking about a way to give users all the path variables are available in paths.js file |
So like a paths argument in a plugin or razzle.config.js? Pull #? |
Do you mean #457? |
no, not that one/ |
@fivethreeo hey, I want to ask @jaredpalmer to tag a new minor relase for Razzle. thanks |
Jared tried something like #714 in #457 and there one pr open in #940. I agree on giving access to paths in the plugins/modify but changing them might be a bit easy to cause conflicts if done in plugins and add extra complexity even if just added to razzle.config.js. If you need custom paths derive them from resolveApp. If builtin options except in start or build scripts needs overriding just replace loaders/plugins with the new options since it is more specific and you know what they will affect. If anything we could add some kind of context where modify/plugins can share options if need be. |
umm |
but it's cool to have it |
But can be a bit confusing if multiple plugins change paths. So maybe just in razzle.config.js? I see multiple modules importing './paths' so we need to pass those around somehow leading to making some parts calls/callbacks instead of imports. |
Another question |
I think terser takes care of that. But not quite sure. |
Been thinking some more about this, there are many options except just regular paths people want to change. What if we change createConfig to first make the options to the various parts of the webpack configuration. Then pass that to modifyOptions in plugins and razzle.config.js to be modified before creating the webpack config. But I also see a need for modifyPaths (even in plugins) aswell. Should it be a way to set where razzle should look for razzle.config.js in monorepos, e.g. a env var? |
https://github.com/jaredpalmer/razzle/blob/master/packages/razzle/config/paths.js#L10
The text was updated successfully, but these errors were encountered: