.minify() method does not allow mix.options for CSS files
See original GitHub issue- Laravel Mix Version: 0.11.2
- Node Version: 6.9.3
- NPM Version: 3.10.10
Description:
.minify()
method does not allow to pass mix.options for CSS files.
In some scenarios I just want cleanCss to inline the CSS and to not rebase URLs. Here is how we can pass additional options:
// src/File.js
minify() {
minify() {
if (this.fileType === '.js') {
this.write(uglify.minify(this.file, options.uglify).code);
}
// From Mix options configuration
options.cleanCss = {
level: 0,
rebase: false
};
if (this.fileType === '.css') {
this.write(
new UglifyCss(options.cleanCss).minify(this.read()).styles
);
}
}
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
minify() method does not allow mix.options for CSS files #735
Description: .minify() method does not allow to pass mix.options for CSS files. In some scenarios I just want cleanCss to inline the CSS...
Read more >Minification issues: theme & minify css file both loaded
I have set up w3tc on our website. I ran a test through pingdom and noticed that two large css files were being...
Read more >Combine and Minify Multiple CSS / JS Files - Stack Overflow
Show activity on this post. Check out minify - it allows you combine multiple js, css files into one just by stacking them...
Read more >Minify CSS - web.dev
Learn how to minify CSS files, to improve performance, without affecting how the browser process the styles.
Read more >The complete best practices for minifying CSS - LogRocket Blog
Minifying CSS files is more nuanced than you might think at first. Learn the various minification tools, how to determine and remove unused ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@rsdev000 Yeah, I am having the same issue as you #760
You have the expected result. Same laravel-mix here, cleancss 4.0.12, npm 6.5.0, node 6.10.3. There’s must be another issue