-
Notifications
You must be signed in to change notification settings - Fork 930
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
Serving multiple versions of components package #1272
Comments
I think webpack has support for this via aliases. Your entry point would be
something like
module.exports = {
ComponentV1 = require(‘componentv1’),
ComponentV2 = require(‘componentv2’)
}
I don’t remember offhand what webpack config changes are needed to make it
work.
…On Tue, Nov 2, 2021 at 06:25, Daniel Nováčik ***@***.***> wrote:
Hi, is there a support to serve multiple version of an npm component
package?
E.g.: I have a components library of v1.0 but there will be major changes
in v2.0 that would break the earlier pages made with v1.0, is there an
ability to provide multiple versions of that package and serve by some
version property?
the scripts are added in the startup:
app.UseReact(config =>
{
config
.SetReuseJavaScriptEngines(true)
.SetLoadBabel(false)
.SetLoadReact(false)
.SetReactAppBuildPath("~/dist");
});
is there a way to provide it with different versions?
(inserting proper version into _Layout.cshtml doesn't seem like a problem,
neither installing different version with npm alias and/or outputting to
dist folders with version)
Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1272>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHGCFUF43UOHV6RCTVNMETUJ64CZANCNFSM5HGC3CMA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Oh so I would have several entry points and outputs with versions and use the app.UseReact with just the ~dist folder with all the versions and just include them in the layout. so it would be only about setting the webpack right? Thanks I'll try to set it up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, is there a support to serve multiple version of an npm component package?
E.g.: I have a components library of v1.0 but there will be major changes in v2.0 that would break the earlier pages made with v1.0, is there an ability to provide multiple versions of that package and serve by some version property?
the scripts are added in the startup:
is there a way to provide it with different versions?
(inserting proper version into _Layout.cshtml doesn't seem like a problem, neither installing different version with npm alias and/or outputting to dist folders with version)
Thanks
The text was updated successfully, but these errors were encountered: