FountainJS / generator-fountain-react

Yeoman 'fountain' generator to start a webapp with React
http://fountainjs.io
MIT License
36 stars 11 forks source link

Nested routes not working #64

Open RemiEven opened 8 years ago

RemiEven commented 8 years ago

Description

When generating a new project (using version 1.0.0-rc1), nested route don't work.

Error Message & Stack Trace

Not much relevant, but the browser's console prints 404 for http://localhost:3000/path/index.js when requesting http://localhost:3000/path/path2

Config

Copy the content from .yo-rc.json:

{
  "generator-fountain-react": {
    "version": "1.0.0-rc1",
    "props": {
      "resolved": "/home/remi/.nvm/versions/node/v6.8.1/lib/node_modules/generator-fountain-react/generators/app/index.js",
      "namespace": "fountain-react:app",
      "argv": {
        "remain": [],
        "cooked": [],
        "original": []
      },
      "framework": "react",
      "modules": "webpack",
      "css": "css",
      "js": "babel",
      "ci": [],
      "sample": "hello",
      "router": "router"
    }
  }
}

Environment

Tell us which operating system you are using, as well as which versions of Node.js, npm, and yo. Run the following to get it quickly:

Node.js v6.8.1
linux 4.7.7-200.fc24.x86_64
yo version 1.8.5
npm version 3.10.8

I fixed the bug locally by modifying the generated webpack config, replacing the output filename "'index.js'" by "'/index.js'".

Swiip commented 8 years ago

Seems related to the use of browersync-sp (https://github.com/shakyShane/browser-sync-spa) a but Fountain rc1 includes it by default... Can you check that it's loaded in your browsersync conf?

gozes commented 7 years ago

@RemiEven did it work?