Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/react-scripts/scripts/utils/frontierInit.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ function installFrontierDependencies(appPath, answers, ownPath) {
configureHF(appPath, ownPath);
}

depsToInstall.push(...['http-proxy-middleware@0.19.0', 'fs-webdev/exo']);
depsToInstall.push(...['http-proxy-middleware@0.19.0', 'fs-webdev/exo', '@reach/router']);
devDepsToInstall.push(
...[
'eslint@5.6.0',
Expand Down
2 changes: 1 addition & 1 deletion packages/react-scripts/template-hf/src/setupProxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = app => {
snowConfig.app = app;
snow(initiatedDirectory, hf, snowConfig);

app.get('/', (req, res) => {
app.get('*', (req, res) => {
res.render('index', {
indexPath: '../dist/_index.html',
// _layoutFile: './async_layout'
Expand Down
12 changes: 10 additions & 2 deletions packages/react-scripts/template/src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
/* eslint-disable react/jsx-filename-extension */
import React from 'react';
import ReactDOM from 'react-dom';
import { Router } from '@reach/router';
import './index.css';
import App from './components/App';
import * as serviceWorker from './serviceWorker';

// eslint-disable-next-line react/jsx-filename-extension
ReactDOM.render(<App />, document.getElementById('root'));
ReactDOM.render(
<Router>
<App path="/" />
</Router>,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that trailing comma important for anything?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it separates the function parameters :)

document.getElementById('root')
);

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister();

/* eslint-enable react/jsx-filename-extension */