single-spa / single-spa-examples

Examples of single-spa applications.
https://single-spa.surge.sh
MIT License
359 stars 128 forks source link

Surge site seems broken #16

Closed TheMcMurder closed 7 years ago

TheMcMurder commented 7 years ago

Lastest deploy of https://single-spa.surge.sh/# is only loading a single child application (navbar)

Looking at the deployed file for single-spa-examples.js I see this:

import * as singleSpa from 'single-spa';

singleSpa.declareChildApplication('navbar', () => SystemJS.import('/build/navbar.app.js'), () => true);
// singleSpa.declareChildApplication('home', () => SystemJS.import('/build/home.app.js'), () => location.hash === "" || location.hash === "#");
// singleSpa.declareChildApplication('angular1', () => SystemJS.import('/build/angular1.app.js'), hashPrefix('/angular1'));
// singleSpa.declareChildApplication('react', () => SystemJS.import('/build/react.app.js'), hashPrefix('/react'));
// singleSpa.declareChildApplication('angular2', () => SystemJS.import('/build/angular2.app.js'), hashPrefix('/angular2'));
//
singleSpa.start();

function hashPrefix(prefix) {
    return function() {
        return window.location.hash.indexOf(`#${prefix}`) === 0;
    }
}

I'm guessing they were commented out for development and ran surge command while they were commented out.

TheMcMurder commented 7 years ago

@joeldenning I think this is an easy fix, but you'll have to be the one to actually deploy again.

joeldenning commented 7 years ago

Yeah sorry about that -- accidentally broken things for a little while