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

Implement Webpack DLL Plugin #495

Merged
merged 8 commits into from Jun 14, 2016

Conversation

Projects
None yet
10 participants
@datapimp
Collaborator

datapimp commented Jun 7, 2016

The primary benefit of this approach is an improvement in server start times and improvements in hot module reload times. On my machine I average an almost 40% improvement in speed on the stock boilerplate setup, and a even larger gains in more mature projects with a larget set of dependencies.

In a development environment, it replaces webpack.CommonsChunkPlugin with webpack.DLLReferencePlugin.

This plugin requires an additional build step to build the DLL file and manifest that gets referenced. This build step is automatically run in a postinstall npm hook.

  • Proof of Concept
  • Script to build DLL
  • Determine best approach for production config
  • Documentation
  • Configuration UI
  • End to end testing

I am not happy with the Configuration UI and would love suggestions on improving it. The main responsibility of the Configuration is to list out all of the dependencies which should get included in the DLL. Currently I pull in everything from the package.json dependencies and require the configuration to specify which modules should not be included via an exclude option. This requires listing all of the server side dependencies such as express, compression, chalk.

Having used the DLL approach extensively in other projects I have here what I consider to be the easiest possible implementation and it asks very little of the user. However the current configuration approach here might get tedious as the list of dependencies grows. The other option would be explicitly listing the dependencies you require, which I mention in the documentation. In either case, it is 100% worth the effort but I'm positive there could be a more user friendly option.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jun 7, 2016

Coverage Status

Coverage increased (+0.002%) to 98.295% when pulling f51d3b9 on webpack-dll-implementation into 4f83162 on master.

coveralls commented Jun 7, 2016

Coverage Status

Coverage increased (+0.002%) to 98.295% when pulling f51d3b9 on webpack-dll-implementation into 4f83162 on master.

@justingreenberg

This comment has been minimized.

Show comment
Hide comment
@justingreenberg

justingreenberg Jun 8, 2016

Member

imo, DX here is about as simple as it can be (without a task runner or orchestrator) and the include/exclude pattern is consistent with webpack proper, great job dude 💯

Member

justingreenberg commented Jun 8, 2016

imo, DX here is about as simple as it can be (without a task runner or orchestrator) and the include/exclude pattern is consistent with webpack proper, great job dude 💯

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jun 8, 2016

Collaborator

Ok I have tested this out by running through the process of cloning / setup / clean etc, and am not noticing any problems; production build looks ok, development server is ok; no console errors, etc.

Collaborator

datapimp commented Jun 8, 2016

Ok I have tested this out by running through the process of cloning / setup / clean etc, and am not noticing any problems; production build looks ok, development server is ok; no console errors, etc.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jun 8, 2016

Coverage Status

Coverage remained the same at 98.293% when pulling 68b9b43 on webpack-dll-implementation into 4f83162 on master.

coveralls commented Jun 8, 2016

Coverage Status

Coverage remained the same at 98.293% when pulling 68b9b43 on webpack-dll-implementation into 4f83162 on master.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jun 8, 2016

Coverage Status

Coverage remained the same at 98.293% when pulling 044ed11 on webpack-dll-implementation into 4f83162 on master.

coveralls commented Jun 8, 2016

Coverage Status

Coverage remained the same at 98.293% when pulling 044ed11 on webpack-dll-implementation into 4f83162 on master.

Show outdated Hide outdated internals/webpack/webpack.dev.babel.js
const logger = require('../../server/logger');
const cheerio = require('cheerio');
// Webpack DLL Plugin Configuration

This comment has been minimized.

@mxstbr

mxstbr Jun 8, 2016

Member

This comment shouldn't be here I think?

@mxstbr

mxstbr Jun 8, 2016

Member

This comment shouldn't be here I think?

Show outdated Hide outdated internals/webpack/webpack.dev.babel.js
));
}
function templateFn() {

This comment has been minimized.

@mxstbr

mxstbr Jun 8, 2016

Member

Lets add some comments explaining what this function does

@mxstbr

mxstbr Jun 8, 2016

Member

Lets add some comments explaining what this function does

Show outdated Hide outdated internals/webpack/webpack.dll.babel.js
/**
* @todo discuss best configuration UI

This comment has been minimized.

@mxstbr

mxstbr Jun 8, 2016

Member

I think this can safely be deleted 😉

@mxstbr

mxstbr Jun 8, 2016

Member

I think this can safely be deleted 😉

Show outdated Hide outdated package.json
"engines": {
"npm": ">=3"
"engines" : {
"npm" : ">=3"

This comment has been minimized.

@mxstbr

mxstbr Jun 8, 2016

Member

Remove the spaces between " and : again please!

@mxstbr

mxstbr Jun 8, 2016

Member

Remove the spaces between " and : again please!

@mxstbr

This comment has been minimized.

Show comment
Hide comment
@mxstbr

mxstbr Jun 8, 2016

Member

Holy guacamoly amazing job @datapimp, this looks incredibly solid!

This might be one of the most HQ PRs this project has ever seen, the DX is lovely, the documentation is on-point, the feature is really useful, couldn't be better!

A few tiny nitpicks above, but then I think we can merge this. Awesome job! 🎉

Member

mxstbr commented Jun 8, 2016

Holy guacamoly amazing job @datapimp, this looks incredibly solid!

This might be one of the most HQ PRs this project has ever seen, the DX is lovely, the documentation is on-point, the feature is really useful, couldn't be better!

A few tiny nitpicks above, but then I think we can merge this. Awesome job! 🎉

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jun 8, 2016

Collaborator

thanks @mxstbr naturally a gentleman does his best work when procrastinating and avoiding IRL responsibilities 💃

sorry to have to force push; i merged in the changes from #491 & #479 and fixed the style issues;

Collaborator

datapimp commented Jun 8, 2016

thanks @mxstbr naturally a gentleman does his best work when procrastinating and avoiding IRL responsibilities 💃

sorry to have to force push; i merged in the changes from #491 & #479 and fixed the style issues;

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jun 8, 2016

Coverage Status

Coverage remained the same at 98.293% when pulling 44dda13 on webpack-dll-implementation into bc245b2 on master.

coveralls commented Jun 8, 2016

Coverage Status

Coverage remained the same at 98.293% when pulling 44dda13 on webpack-dll-implementation into bc245b2 on master.

@ashwinvandijk

This comment has been minimized.

Show comment
Hide comment
@ashwinvandijk

ashwinvandijk Jun 8, 2016

I wanted to try this for my project (which is based on this repo), by pulling this in. Didn't work, so I cloned this branch into a new folder, but there it also doesn't work. My browser tries to fetch reactBoilerplateDeps.js (from the root, which seems right), but it returns the html of index.html, including the just included tag
<script data-dll="true" src="/reactBoilerplateDeps.js"></script>

Am I doing something wrong?

ashwinvandijk commented Jun 8, 2016

I wanted to try this for my project (which is based on this repo), by pulling this in. Didn't work, so I cloned this branch into a new folder, but there it also doesn't work. My browser tries to fetch reactBoilerplateDeps.js (from the root, which seems right), but it returns the html of index.html, including the just included tag
<script data-dll="true" src="/reactBoilerplateDeps.js"></script>

Am I doing something wrong?

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jun 8, 2016

Collaborator

Hi @ashwinvandijk - did you run npm install? Does npm run build:dll create the file for you in node_modules/react-boilerplate-dlls? does your package json have the dllPlugin config in it? I will try testing this again myself to see if anything changed

Collaborator

datapimp commented Jun 8, 2016

Hi @ashwinvandijk - did you run npm install? Does npm run build:dll create the file for you in node_modules/react-boilerplate-dlls? does your package json have the dllPlugin config in it? I will try testing this again myself to see if anything changed

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jun 8, 2016

Coverage Status

Coverage remained the same at 98.293% when pulling e73abcf on webpack-dll-implementation into b589b30 on master.

coveralls commented Jun 8, 2016

Coverage Status

Coverage remained the same at 98.293% when pulling e73abcf on webpack-dll-implementation into b589b30 on master.

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jun 9, 2016

Collaborator

Let's hold off on merging this - I have an idea for a way of making it a lot easier to keep projects based on this boilerplate up to date with improvements made to internals/

Collaborator

datapimp commented Jun 9, 2016

Let's hold off on merging this - I have an idea for a way of making it a lot easier to keep projects based on this boilerplate up to date with improvements made to internals/

@ashwinvandijk

This comment has been minimized.

Show comment
Hide comment
@ashwinvandijk

ashwinvandijk Jun 9, 2016

That would be great! Since I already changed some things I couldn't just pull this request, I had to copy the changes manually. I did run npm install by the way, and the right files are being created at the right place. Also, my package.json contains the dllPlugin. I'm interested in the solution for keeping up to date, would be really nice! Thanks in advance.

ashwinvandijk commented Jun 9, 2016

That would be great! Since I already changed some things I couldn't just pull this request, I had to copy the changes manually. I did run npm install by the way, and the right files are being created at the right place. Also, my package.json contains the dllPlugin. I'm interested in the solution for keeping up to date, would be really nice! Thanks in advance.

@mxstbr

This comment has been minimized.

Show comment
Hide comment
@mxstbr

mxstbr Jun 9, 2016

Member

I have an idea for a way of making it a lot easier to keep projects based on this boilerplate up to date with improvements made to internals/

This is going to be good…

Member

mxstbr commented Jun 9, 2016

I have an idea for a way of making it a lot easier to keep projects based on this boilerplate up to date with improvements made to internals/

This is going to be good…

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jun 10, 2016

Collaborator

I'm such a newb this whole time I have been testing against a cached service worker build and didn't even catch my mistake. The middleware wasn't serving the assets -- I'll fix it ASAP and write some tests for this

Collaborator

datapimp commented Jun 10, 2016

I'm such a newb this whole time I have been testing against a cached service worker build and didn't even catch my mistake. The middleware wasn't serving the assets -- I'll fix it ASAP and write some tests for this

@ashwinvandijk

This comment has been minimized.

Show comment
Hide comment
@ashwinvandijk

ashwinvandijk Jun 10, 2016

Haha, happens to the best. Really appreciate the work you (and others) put into this, thank you!

ashwinvandijk commented Jun 10, 2016

Haha, happens to the best. Really appreciate the work you (and others) put into this, thank you!

@mxstbr

This comment has been minimized.

Show comment
Hide comment
@mxstbr

mxstbr Jun 13, 2016

Member

How are we looking here @datapimp? 😁

Member

mxstbr commented Jun 13, 2016

How are we looking here @datapimp? 😁

@mxstbr mxstbr added the in progress label Jun 13, 2016

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jun 13, 2016

Collaborator

@mxstbr Getting some unrelated build errors I need to fix. I believe the problem @ashwinvandijk reported should be fixed, I will wrap this up tonight.

Collaborator

datapimp commented Jun 13, 2016

@mxstbr Getting some unrelated build errors I need to fix. I believe the problem @ashwinvandijk reported should be fixed, I will wrap this up tonight.

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jun 14, 2016

Coverage Status

Coverage remained the same at 98.291% when pulling 9a96a6b on webpack-dll-implementation into f6afe0d on master.

coveralls commented Jun 14, 2016

Coverage Status

Coverage remained the same at 98.291% when pulling 9a96a6b on webpack-dll-implementation into f6afe0d on master.

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jun 14, 2016

Collaborator

The following should run without any problems.

git clone git@github.com:msxtbr/react-boilerplate.git --branch webpack-dll-implementation
cd react-boilerplate
npm run setup
npm run start:production

@ashwinvandijk if you wouldn't mind testing?

Adding the DLL plugin to an existing project will involve adding your own config to package.json. The internals/config.js script has some defaults

I had to pause the staying in sync with the boilerplate internals ideas for a minute. I think having a proper CLI is a prerequisite for that, we can discuss that in its own thread.

Collaborator

datapimp commented Jun 14, 2016

The following should run without any problems.

git clone git@github.com:msxtbr/react-boilerplate.git --branch webpack-dll-implementation
cd react-boilerplate
npm run setup
npm run start:production

@ashwinvandijk if you wouldn't mind testing?

Adding the DLL plugin to an existing project will involve adding your own config to package.json. The internals/config.js script has some defaults

I had to pause the staying in sync with the boilerplate internals ideas for a minute. I think having a proper CLI is a prerequisite for that, we can discuss that in its own thread.

@ashwinvandijk

This comment has been minimized.

Show comment
Hide comment
@ashwinvandijk

ashwinvandijk Jun 14, 2016

Looks good to me, works great! Thanks for your work, love the shorter buildtimes!

ashwinvandijk commented Jun 14, 2016

Looks good to me, works great! Thanks for your work, love the shorter buildtimes!

@mxstbr

This comment has been minimized.

Show comment
Hide comment
@mxstbr

mxstbr Jun 14, 2016

Member

Getting a really really weird error when running npm run build:

> react-boilerplate@3.0.0 build:clean /Users/a2517/sites/personal/github/react-boilerplate
> rimraf ./build/*


> react-boilerplate@3.0.0 build /Users/a2517/sites/personal/github/react-boilerplate
> cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p

 [602] multi main 28 bytes {0} [built]
    + 647 hidden modules

npm ERR! Darwin 15.2.0
npm ERR! argv "/Users/a2517/.nvm/versions/node/v6.0.0/bin/node" "/Users/a2517/.nvm/versions/node/v6.0.0/bin/npm" "run" "build"
npm ERR! node v6.0.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! react-boilerplate@3.0.0 build: `cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the react-boilerplate@3.0.0 build script 'cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs react-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls react-boilerplate
npm ERR! There is likely additional logging output above.

Any ideas what the culprit could be? No idea what the ELIFECYCLE and error code 2 are…

Member

mxstbr commented Jun 14, 2016

Getting a really really weird error when running npm run build:

> react-boilerplate@3.0.0 build:clean /Users/a2517/sites/personal/github/react-boilerplate
> rimraf ./build/*


> react-boilerplate@3.0.0 build /Users/a2517/sites/personal/github/react-boilerplate
> cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p

 [602] multi main 28 bytes {0} [built]
    + 647 hidden modules

npm ERR! Darwin 15.2.0
npm ERR! argv "/Users/a2517/.nvm/versions/node/v6.0.0/bin/node" "/Users/a2517/.nvm/versions/node/v6.0.0/bin/npm" "run" "build"
npm ERR! node v6.0.0
npm ERR! npm  v3.8.6
npm ERR! code ELIFECYCLE
npm ERR! react-boilerplate@3.0.0 build: `cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the react-boilerplate@3.0.0 build script 'cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the react-boilerplate package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     cross-env NODE_ENV=production webpack --config internals/webpack/webpack.prod.babel.js --color -p
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs react-boilerplate
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls react-boilerplate
npm ERR! There is likely additional logging output above.

Any ideas what the culprit could be? No idea what the ELIFECYCLE and error code 2 are…

@coveralls

This comment has been minimized.

Show comment
Hide comment
@coveralls

coveralls Jun 14, 2016

Coverage Status

Coverage remained the same at 98.291% when pulling 50ff324 on webpack-dll-implementation into a31858b on master.

coveralls commented Jun 14, 2016

Coverage Status

Coverage remained the same at 98.291% when pulling 50ff324 on webpack-dll-implementation into a31858b on master.

@mxstbr

This comment has been minimized.

Show comment
Hide comment
@mxstbr

mxstbr Jun 14, 2016

Member

Weirdly enough CI seems to be fine, and if I run the command directly it works too:

➜  react-boilerplate git:(webpack-dll-implementation) ./node_modules/.bin/cross-env NODE_ENV=production ./node_modules/.bin/webpack --config internals/webpack/webpack.prod.babel.js --color -p
 [602] multi main 28 bytes {0} [built]
    + 647 hidden modules
➜  react-boilerplate git:(webpack-dll-implementation)

Must be an environment problem, a pretty annoying one though. 😁

Member

mxstbr commented Jun 14, 2016

Weirdly enough CI seems to be fine, and if I run the command directly it works too:

➜  react-boilerplate git:(webpack-dll-implementation) ./node_modules/.bin/cross-env NODE_ENV=production ./node_modules/.bin/webpack --config internals/webpack/webpack.prod.babel.js --color -p
 [602] multi main 28 bytes {0} [built]
    + 647 hidden modules
➜  react-boilerplate git:(webpack-dll-implementation)

Must be an environment problem, a pretty annoying one though. 😁

@mxstbr

This comment has been minimized.

Show comment
Hide comment
@mxstbr

mxstbr Jun 14, 2016

Member

Holy speedy rebuilds this is fast as fuck!

Member

mxstbr commented Jun 14, 2016

Holy speedy rebuilds this is fast as fuck!

@mxstbr

This comment has been minimized.

Show comment
Hide comment
@mxstbr

mxstbr Jun 14, 2016

Member

Take a look at this:

react-boilerplate-rebuilds

I mean, I was expecting a slight improvement but I did not expect this. Hell yeah, ace work @datapimp! 🔥

Is this ready to be merged??

Member

mxstbr commented Jun 14, 2016

Take a look at this:

react-boilerplate-rebuilds

I mean, I was expecting a slight improvement but I did not expect this. Hell yeah, ace work @datapimp! 🔥

Is this ready to be merged??

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jun 14, 2016

Collaborator

Yeah I think it is good to go

Collaborator

datapimp commented Jun 14, 2016

Yeah I think it is good to go

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jun 14, 2016

Collaborator

@mxstbr that is pretty fast :) also I just noticed the chunk sizes for the production builds. Now that the CommonsChunkPlugin is configured to handle async chunks properly, the file sizes seem to have improved dramatically as well.

The error you're experiencing is related to npm lifecycle hooks. I am wondering if we can come up with something in the very short term to tame the npm scripts until we get a CLI in place.

Collaborator

datapimp commented Jun 14, 2016

@mxstbr that is pretty fast :) also I just noticed the chunk sizes for the production builds. Now that the CommonsChunkPlugin is configured to handle async chunks properly, the file sizes seem to have improved dramatically as well.

The error you're experiencing is related to npm lifecycle hooks. I am wondering if we can come up with something in the very short term to tame the npm scripts until we get a CLI in place.

@mxstbr mxstbr merged commit 56eb5a0 into master Jun 14, 2016

5 checks passed

continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 98.291%
Details

@mxstbr mxstbr deleted the webpack-dll-implementation branch Jun 14, 2016

@mxstbr

This comment has been minimized.

Show comment
Hide comment
@mxstbr

mxstbr Jun 14, 2016

Member

The error you're experiencing is related to npm lifecycle hooks.

Yeah, I realized it's because I hadn't done npm install – that error could've been a lot more explicit, but anyhow.

Member

mxstbr commented Jun 14, 2016

The error you're experiencing is related to npm lifecycle hooks.

Yeah, I realized it's because I hadn't done npm install – that error could've been a lot more explicit, but anyhow.

@andykenward

This comment has been minimized.

Show comment
Hide comment
@andykenward

andykenward Jun 21, 2016

Contributor

Great work!! Would there be a benefit in using this for the unit tests?
Mainly for npm run test:watch
webpack.test.babel.js

Contributor

andykenward commented Jun 21, 2016

Great work!! Would there be a benefit in using this for the unit tests?
Mainly for npm run test:watch
webpack.test.babel.js

@oyeanuj

This comment has been minimized.

Show comment
Hide comment
@oyeanuj

oyeanuj Jun 28, 2016

@datapimp This is great. There is another similar implementation discussion going on in another react-redux-universal-hot-example repo which is taking a slightly different approach. Anything good to take away from there?

erikras/react-redux-universal-hot-example#616 (comment)
erikras/react-redux-universal-hot-example#1201

oyeanuj commented Jun 28, 2016

@datapimp This is great. There is another similar implementation discussion going on in another react-redux-universal-hot-example repo which is taking a slightly different approach. Anything good to take away from there?

erikras/react-redux-universal-hot-example#616 (comment)
erikras/react-redux-universal-hot-example#1201

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jul 1, 2016

Collaborator

Thanks @oyeanuj I facepalmed when I saw that you could use express.static more than once, so I will borrow that from them https://github.com/mxstbr/react-boilerplate/pull/625/files#diff-f4001f47a5e162a1e289e5f1ff589931R31

and i will keep looking at it to see if there's anything else.

Collaborator

datapimp commented Jul 1, 2016

Thanks @oyeanuj I facepalmed when I saw that you could use express.static more than once, so I will borrow that from them https://github.com/mxstbr/react-boilerplate/pull/625/files#diff-f4001f47a5e162a1e289e5f1ff589931R31

and i will keep looking at it to see if there's anything else.

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jul 1, 2016

Collaborator

@andykenward I don't see why it wouldn't improve the test speed. I pushed a branch if you wouldn't mind trying it out.

https://github.com/mxstbr/react-boilerplate/tree/feature/webpack-dll-in-test-env

I didn't notice a drastic speed improvement in the stock project but that tells me that either something is wrong with my current implementation or the test suite in the stock project is already too fast.

Feel free to check it out and let me know if you spot anything

Collaborator

datapimp commented Jul 1, 2016

@andykenward I don't see why it wouldn't improve the test speed. I pushed a branch if you wouldn't mind trying it out.

https://github.com/mxstbr/react-boilerplate/tree/feature/webpack-dll-in-test-env

I didn't notice a drastic speed improvement in the stock project but that tells me that either something is wrong with my current implementation or the test suite in the stock project is already too fast.

Feel free to check it out and let me know if you spot anything

@RudthMael

This comment has been minimized.

Show comment
Hide comment
@RudthMael

RudthMael Jul 14, 2016

Great work!
I've been struggling with moment-timezone though:

ERROR in ./~/moment-timezone/data/packed/latest.json
Module parse failed: ~/dev/someproject/node_modules/moment-timezone/data/packed/latest.json Unexpected token (2:10)
You may need an appropriate loader to handle this file type.
| {
|   "version": "2016d",
|   "zones": [
|       "Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5",
 @ ./~/moment-timezone/index.js 2:15-51

Maybe json is not supported or json-loader is not used here?

I ended up adding it to the exclude section of the package.json file.

diff --git a/package.json b/package.json
index a3bed25..363c244 100644
--- a/package.json
+++ b/package.json
@@ -119,7 +119,8 @@
       "express",
       "ip",
       "minimist",
-      "sanitize.css"
+      "sanitize.css",
+      "moment-timezone"
     ],
     "include": [
       "core-js",

RudthMael commented Jul 14, 2016

Great work!
I've been struggling with moment-timezone though:

ERROR in ./~/moment-timezone/data/packed/latest.json
Module parse failed: ~/dev/someproject/node_modules/moment-timezone/data/packed/latest.json Unexpected token (2:10)
You may need an appropriate loader to handle this file type.
| {
|   "version": "2016d",
|   "zones": [
|       "Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5",
 @ ./~/moment-timezone/index.js 2:15-51

Maybe json is not supported or json-loader is not used here?

I ended up adding it to the exclude section of the package.json file.

diff --git a/package.json b/package.json
index a3bed25..363c244 100644
--- a/package.json
+++ b/package.json
@@ -119,7 +119,8 @@
       "express",
       "ip",
       "minimist",
-      "sanitize.css"
+      "sanitize.css",
+      "moment-timezone"
     ],
     "include": [
       "core-js",
@kachkaev

This comment has been minimized.

Show comment
Hide comment
@kachkaev

kachkaev Jul 27, 2016

Contributor

Hi @datapimp, could you please have a quick look at the issue Webpack DLL Plugin brings into apps with web workers? I did some investigation here: #784. After I moved back to CommonsChunkPlugin in the boilerplate, the problem got solved. My gut feeling is that we can somehow tweak what's being built and thus permanently make web workers compatible with the boilerplate, even when Webpack DLL Plugin is on. Let me know what you think in #784!

Contributor

kachkaev commented Jul 27, 2016

Hi @datapimp, could you please have a quick look at the issue Webpack DLL Plugin brings into apps with web workers? I did some investigation here: #784. After I moved back to CommonsChunkPlugin in the boilerplate, the problem got solved. My gut feeling is that we can somehow tweak what's being built and thus permanently make web workers compatible with the boilerplate, even when Webpack DLL Plugin is on. Let me know what you think in #784!

@datapimp

This comment has been minimized.

Show comment
Hide comment
@datapimp

datapimp Jul 27, 2016

Collaborator

Hi, I'm currently in a client engagement that has me tied up until early
next week at which point there are a number of things I have queued up on
this project. I will definitely add this to my list

On Wednesday, July 27, 2016, Alexander Kachkaev notifications@github.com
wrote:

Hi @datapimp https://github.com/datapimp, could you please have a quick
look at the issue Webpack DLL Plugin brings into apps with web workers? I
did some investigation here: #784
#784. After I moved
back to CommonsChunkPlugin in the boilerplate, the problem got solved. My
gut feeling is that we can somehow tweak what's being built and thus
permanently make web workers compatible with the boilerplate, even when
Webpack DLL Plugin is on. Let me know what you think in #784
#784!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#495 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACn0Kr6j--SQuFN6aM0YhkW7JYykJGrks5qZ6kwgaJpZM4Iwc15
.

Collaborator

datapimp commented Jul 27, 2016

Hi, I'm currently in a client engagement that has me tied up until early
next week at which point there are a number of things I have queued up on
this project. I will definitely add this to my list

On Wednesday, July 27, 2016, Alexander Kachkaev notifications@github.com
wrote:

Hi @datapimp https://github.com/datapimp, could you please have a quick
look at the issue Webpack DLL Plugin brings into apps with web workers? I
did some investigation here: #784
#784. After I moved
back to CommonsChunkPlugin in the boilerplate, the problem got solved. My
gut feeling is that we can somehow tweak what's being built and thus
permanently make web workers compatible with the boilerplate, even when
Webpack DLL Plugin is on. Let me know what you think in #784
#784!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#495 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACn0Kr6j--SQuFN6aM0YhkW7JYykJGrks5qZ6kwgaJpZM4Iwc15
.

@bsr203

This comment has been minimized.

Show comment
Hide comment
@bsr203

bsr203 Jul 29, 2016

@datapimp you are wrong. :-) your implementation of dll for unit test work incredibly well. It cutdown my initial startup and further rebuild time. great work and thanks a ton. I do have more components than the boilerplate.

bsr203 commented Jul 29, 2016

@datapimp you are wrong. :-) your implementation of dll for unit test work incredibly well. It cutdown my initial startup and further rebuild time. great work and thanks a ton. I do have more components than the boilerplate.

@lock

This comment has been minimized.

Show comment
Hide comment
@lock

lock bot May 29, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

lock bot commented May 29, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators May 29, 2018

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.