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

Explore AutoDLLPlugin and Vendor bundling #305

Closed
jaredpalmer opened this issue Jul 3, 2017 · 2 comments
Closed

Explore AutoDLLPlugin and Vendor bundling #305

jaredpalmer opened this issue Jul 3, 2017 · 2 comments

Comments

@jaredpalmer
Copy link
Owner

jaredpalmer commented Jul 3, 2017

This AutoDLLPlugin should dramatically speed up HMR. The question is how to generically incorporate it into Razzle. As we are in isomorphic land, it's hard to know if a dep is meant for node-only. AFAIK this means we'd have to let users specify which packages to include.

Idea 1: Special field in razzle.config.js

// razzle.config.js

module.exports = {
 modify() {..},
 dll: [ 
   'react',
   'react-dom',
   ...
 ]
}

Idea 2: Special Razzle package

// razzle.config.js
const razzleDLLPlugin = require('razzle-plugin-auto-dll');

module.exports = {
 modify(config) {
   return razzleDLLPlugin(config)
 }
}

I opt for 2 personally. Want to open this up for discussion though.

@pedronauck
Copy link

I tried to put AutoDDL plugin with Razzle but was not a good experience, I think that was a great idea thinking about that ✌️

+1

@Metnew
Copy link

Metnew commented Feb 8, 2018

I tried to add AutoDLL plugin, it works only on the initial render, but after HMR it breaks an app with an error like "could not find dll-reference". However, dll script was inserted.

Also, a special field for AutoDLL (and CommonChunksPlugin) in razzle.config.js looks good

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

No branches or pull requests

3 participants