Comments (7)
Same thing here.
The less-loader/css-loader output is effectively stripped from bundle by the ExtractTextPlugin
But stats.json still show them. Maybe an issue in the generation of json output? (i.e., using --json argument)
An possible workaround is to check the issuer
field since it has the following pattern when is extracted from bundle:
\\node_modules\\extract-text-webpack-plugin\\loader.js?{\"remove\":true}
from webpack-visualizer.
@chrisbateman It seems less-loader is still affected (not seeing css-loader though) https://www.dropbox.com/s/9on4hjfafdjy9zv/Screenshot%202017-01-09%2014.40.25.png?dl=0
Using v 0.1.7 which was released 15 hours ago.
from webpack-visualizer.
@motin So right now I believe we're only removing CSS if it uses the ExtractTextPlugin - which moves the CSS to a separate file. Otherwise, the CSS is still included in your JS bundle.
from webpack-visualizer.
@chrisbateman ExtractTextPlugin is used in our config, and the CSS is placed in a separate file because of to that. The screenshot however shows that "less-loader" still is included, even though it is only a dev-dependency in our project.
from webpack-visualizer.
@motin Hmm, I don't think I'm seeing that in my test app.
Any chance you could share your loader config and maybe even your stats.json?
from webpack-visualizer.
I analyzed the stats of one of my projects, see below
Stats: https://1drv.ms/u/s!AhehaflTFeyS9CR_UiVT6Z7CVxaG
https://github.com/blikblum/marionette-wires-revisited/blob/master/src/main.js
All css is required by 'main.less' and extracted into a separate file (checked the actual bundle to make sure).
Tracking main.less entries in stats log i got the following:
-
main.less entry as id 212 with name as "./src/main.less"
extract-text-plugin is in identifier path, but NOT in issuer
index !== null
"chunks": [0] -
second main.less entry as id 213 with name as "./
/css-loader!.//less-loader!./src/main.less"
extract-text-plugin is NOT in identifier path, but is in issuer
index !== null
"chunks": []
later comes all *.less files required by main.less, the first being wells.less with the following pattern
- name: "./~ /less-loader/stringify.loader.js!./~/bootstrap/less/[name of the less file]"
extract-text-plugin is NOT in identifier path and is NOT in issuer
index: null
"chunks": []
With this i modified the buildHierarchy to account these situations. Will do a PR to be reviewed
from webpack-visualizer.
@blikblum Awesome. I think it maybe it wasn't showing up in my example since none of my less files were in the node_modules. Thanks very much!
from webpack-visualizer.
Related Issues (20)
- Doesn't work with webpack-dev-server?
- Any node\npm api?
- Visualizer is inaccurate when used with MiniCssExtractPlugin
- Remove react and react-dom from dependency list
- DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead HOT 7
- Totally craches when i trying to upload stats.json file
- Cannot read property 'forEach' of undefined HOT 8
- Endless loop when full path is added in 'filename' option
- Request: Open stats report in default browser automatically HOT 1
- Doesn't work with Angular CLI output
- Active? HOT 3
- How do I find out what's included in "+ modules" (plus modules) HOT 2
- DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead at VisualizerPlugin.apply HOT 2
- CLI version
- Problems after updating to babel 7 HOT 1
- How can I use webpack-visualizer with a nextjs application ? HOT 1
- Webpack-visualiser website not working HOT 1
- Webpack 5 compatibiliy issue - compiler.plugin is not a function HOT 4
- "Compare" mode
- FileReader returns an empty string when the file size is to large
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 webpack-visualizer.