Skip to content
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

"order" attribute in route causing production error #92

Closed
jamsterdam29 opened this issue Mar 19, 2019 · 1 comment
Closed

"order" attribute in route causing production error #92

jamsterdam29 opened this issue Mar 19, 2019 · 1 comment
Assignees

Comments

@jamsterdam29
Copy link

Issue

The "order" attribute in routes seems to be causing an issue in production builds. Under local dev, no issue is noticed. However under a static production build, the mount function of the target component is called, but the component itself is never loaded/mounted. No errors are reported in the console.

Reproduce

When publish with this route, ContentPage is never loaded:
{ path: '/pathtopage', order: 10, exact: true, component: ContentPage, load: params => deps.actions.ContentPage.mount(params), }

When publish with this route, ContentPage is loaded as expected:
{ path: '/pathtopage', exact: true, component: ContentPage, load: params => deps.actions.ContentPage.mount(params), }

@jdillick jdillick self-assigned this Mar 20, 2019
@jdillick
Copy link
Member

Unable to reproduce.

import ContentPage from './index';
import ContentPage2 from './ContentPage2';
import deps from 'dependencies';

export default [
    {
        path: '/content-page',
        component: ContentPage,
        // Comment out to make order important
        // exact: true
        order: 2,
        load: (params, search) => deps.actions.ContentPage.mount({ params, search }),
    },
    {
        path: '/content-page/:test',
        exact: true,
        component: ContentPage2,
        order: 1,
    },
];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants