Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
Use prettier URLs for vendor static assets
Browse files Browse the repository at this point in the history
Get rid of the ugly `node_modules` paths in the downloaded JS resources.

Test Plan: `npm start`, then hit http://localhost:3000/ in the browser
and see the widgets list.
  • Loading branch information
wincent committed Sep 29, 2015
1 parent 8707947 commit d9dd225
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
}
</script>
<script src="http://localhost:3000/webpack-dev-server.js"></script>
<script src="node_modules/react/dist/react.min.js"></script>
<script src="node_modules/react/dist/react-dom.min.js"></script>
<script src="node_modules/react-relay/dist/relay.js" onerror="warnRelayMissing()"></script>
<script src="react/react.min.js"></script>
<script src="react/react-dom.min.js"></script>
<script src="relay/relay.js" onerror="warnRelayMissing()"></script>
<script src="js/app.js"></script>
</body>
</html>
8 changes: 4 additions & 4 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ var app = new WebpackDevServer(compiler, {
// Serve static resources
app.use('/', express.static(path.resolve(__dirname, 'public')));
app.use(
'/node_modules/react',
express.static(path.resolve(__dirname, 'node_modules/react'))
'/react',
express.static(path.resolve(__dirname, 'node_modules/react/dist'))
);
app.use(
'/node_modules/react-relay',
express.static(path.resolve(__dirname, 'node_modules/react-relay'))
'/relay',
express.static(path.resolve(__dirname, 'node_modules/react-relay/dist'))
);
app.listen(APP_PORT, () => {
console.log(`App is now running on http://localhost:${APP_PORT}`);
Expand Down

0 comments on commit d9dd225

Please sign in to comment.