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

Thoughts about Webpack Code splitting #17

Open
export-mike opened this issue May 22, 2017 · 2 comments
Open

Thoughts about Webpack Code splitting #17

export-mike opened this issue May 22, 2017 · 2 comments
Labels

Comments

@export-mike
Copy link

Interested to hear any thoughts you have on using joi-browser with webpack code splitting, would it result in lazy loading? or would it end up where everything is required upfront?

@export-mike
Copy link
Author

export-mike commented May 22, 2017

For example purposes: where you use a method that requires 'moment' or some other heavy dependency

function date() { require.ensure('moment') }

@jeffbski
Copy link
Owner

jeffbski commented Jun 3, 2017

I think the biggest issue is that everything that uses moment is expecting it to be available via synchronous require so the require.ensure returns a promise that one must wait for. So the code wouldn't be compatible as is. It would be nice if it was that easy.

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