Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

On-demand module bundling on development environment #1

Open
regalius opened this issue Dec 25, 2018 · 1 comment
Open

On-demand module bundling on development environment #1

regalius opened this issue Dec 25, 2018 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@regalius
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As our user's app grows, their build time would be significantly slower since webpack needs to compile much more files than before, this will results more waiting to compile time while we develop.

Describe the solution you'd like
So my proposal is to implement on-demand module booting, module would only be built when requested, I think this would help to reduce the compile time.

Describe alternatives you've considered
We've tried to implement many optimization for webpack development build but it doesn't really add significant benefits, other easier approach is to build a module selector on start CLI, for example:

yarn start --module my_module

or if we want to work with multiple module, maybe we can do:

yarn start --module my_module,my_module2
@regalius regalius added enhancement New feature or request question Further information is requested labels Dec 25, 2018
@martinock
Copy link
Contributor

martinock commented Apr 23, 2019

I've been thinking about trying to create a copy of _route without unselected routes.

Example: We have 5 modules

yarn start --module module1,module2

Before we run the "real" start, we will remove module3, module4, and module5 routes and write the result to another files I suggest: route.development.js, path.development.js, and module.development.js. Then we use these files to start our dev server

Is it okay to do this? Or is there any better approach?

martinock pushed a commit that referenced this issue Apr 26, 2019
provide args when start the apps (development) `yarn start --module my_module1,my_module2,`. This
arguments will only works on development environment. This script refer modules name from
`src/_route/route.js` and we recommend you to give module folder names (@page/<module_name>),
variable names in `/src/_route/path.js` and `/src/_route/module.js` the same name with the
corresponding conventions

re #1
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants