Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make entry and source directory configurable #115

Open
insin opened this issue Jun 1, 2016 · 3 comments
Open

Make entry and source directory configurable #115

insin opened this issue Jun 1, 2016 · 3 comments
Labels

Comments

@insin
Copy link
Owner

insin commented Jun 1, 2016

You shouldn't have to move files around to swap nwb into an existing app for build tooling

@insin
Copy link
Owner Author

insin commented Jun 2, 2016

Remembering why I hardcoded all the entry points - they end up in 3 different configurations of webpack config (path, object with path, array of entry points) and the same type of command is used twice for different things in one of the project types.

Notes:

Need custom entry for:

  type       command               data needed                            common entry point
  ----       -------               ------------------------------------   ------------------
  app        Serve React App       (path, ends up in an array)            webpackServer()
  app        Build React App       (object - property names the bundle)   webpackBuild()
  app        Serve Web App         (path, ends up in an array)            webpackServer()
  app        Build Web App         (object - property names the bundle)   webpackBuild()
  component  Build Component UMD   (path)                                 webpackBuild()

Separate custom entry for?

  component  Serve Component Demo  (path, ends up in an array)            webpackServer()
  component  Build Component Demo  (object - property names the bundle)   webpackBuild()

Don't need custom entry for:

  Module Build
  Tests

A problem:

  React component modules use `webpackBuild()` twice

Solutions?

  Pass an extra options argument to it?

  `webpackBuild()` - entry from build config passes through to
  `createWebpackConfig()` - looks doable!

Does this solution fix anything else?

   `webpackServer()` - entry is created in `createServerWebpackConfig()`,
   passed to `createWebpackConfig()` - looks doable!

In both cases, we need to know whether or not we're building a demo (to use
a different piece of user config for custom entry?)

New options argument: `options = {demo: false}`?

@insin
Copy link
Owner Author

insin commented Jun 3, 2016

Of course! Command line arguments!

@alesdotio
Copy link

Sorry for bumping, but has there been any progress on this? Are there any workarounds?

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

No branches or pull requests

2 participants