Comments (13)
Example input and output: https://gist.github.com/vigneshshanmugam/89867ac713d1160c865c53c93e47470a
from optimize-js.
For science: https://gist.github.com/ggoodman/72c4366ebe9bee47ad158527ee4c5e93
from optimize-js.
Did we test these w/ the V8LazyParseWebpackPlugin?
from optimize-js.
@TheLarkInn if I had some guidance on moving to Webpack 2, I would try it out.
from optimize-js.
That plugin may work with webpack 1 also, but what specifically do you need help with for webpack 2.
from optimize-js.
This may be a good first patch, given that you basically just need to add a new test case (input.js
and output.js
) and then add a new condition to check if the function is inside an array inside of a call expression. ASTExplorer is very helpful here.
from optimize-js.
@TheLarkInn Does lazyparseplugin adds the parans for the modules in array?
from optimize-js.
It sure does!! If you have a large app feel free to try it. Only catch is that I believe you have to tell UglifyJsPlugin compress option to set negate_iife: false
.
from optimize-js.
@vigneshshanmugam if you have an app that we can test with I'd be interested to see the statistics.
from optimize-js.
@TheLarkInn I tried it and updated the gist. It fails to wrap the inner functions as well.
Also updated the readme here - TheLarkInn/LazyParseWebpackPlugin#4
from optimize-js.
Awesome!!! I intentionally didn't wrap the inner functions inside modules because I wasn't sure the benefit, but it's definitely possible to use a webpack parser plugin to do this.
from optimize-js.
Ahh got it.. But i believe the benchmarks in the README includes the wrapping for inner functions as well.. Anyways as you said, its possible to do this :)
from optimize-js.
Fixed in #33
from optimize-js.
Related Issues (20)
- Benchmark script's improvement calculation is off a bit HOT 4
- Have you tested angularjs v1 and v2? HOT 1
- Use benchmark.js or similar, report standard deviation
- uglify > optimize source map HOT 1
- Not as optimized for Browserify as it could be. HOT 3
- Benchmark unfairly excludes compilation time. HOT 4
- Bad Readme example? HOT 2
- Benchmark doesn't appear to work.
- I made a Web UI for optimize-js
- Is there a browser side version? HOT 2
- Is the readme correct? HOT 1
- Made a Ruby gem
- Do minifiers undo this? HOT 1
- Heuristic improvement: don't paren-wrap lazy-require()d modules
- Encoding problem HOT 2
- Memory leak HOT 3
- Reaches parse error with async functions
- Can you update tests in README to current browser versions? HOT 1
- Unrecognised character '#' on line 1
- Vulnerability GHSA-7FHM-MQM4-2WP7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from optimize-js.