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

Use the starter kit without all the server related stuff #28

Closed
faeronsayn opened this issue Aug 18, 2015 · 2 comments
Closed

Use the starter kit without all the server related stuff #28

faeronsayn opened this issue Aug 18, 2015 · 2 comments
Labels

Comments

@faeronsayn
Copy link

How easy would it be to modify this boilerplate so it's not using koa, and simply becomes a boilerplate for react and redux?

@dvdzkwsk
Copy link
Owner

Hey, it's super easy. As far as webpack goes, literally all you need to do is remove the server entry point in ~/webpack.config.js. That file can now just read:

module.exports = exports = [
  require('./src/entry-points/client')
];

Webpack will now only ever bundle your client application. If you want to remove all the extra stuff that's no longer needed in the project, you can delete these folders/files:

  • ~/build/webpack/server
  • ~/server
  • ~/src/entry-points/server.js

You may have to tweak the npm scripts in package.json and Procfile if you plan to use any that touched the server (e.g. npm run deploy), just to remove any remaining references to the server, but all of that should be pretty straightforward. Using npm run dev and npm run compile will continue to function without any additional work. And then pretty much all that's left is to remove the Koa-related dependencies (not necessary, but would cut down on your install size).

But yeah, that's pretty much it. The server stuff is all pretty well isolated and can just be ignored for the most part, even without significant changes to the project.

@dvdzkwsk
Copy link
Owner

Closing this since there's now a branch for this.

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

No branches or pull requests

2 participants