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

Bundled CSS not Minifying #346

Closed
sweeperq opened this issue Mar 23, 2018 · 9 comments
Closed

Bundled CSS not Minifying #346

sweeperq opened this issue Mar 23, 2018 · 9 comments

Comments

@sweeperq
Copy link

Installed product versions

  • Visual Studio: 2017 Community (15.6.1)
  • This extension: 2.5.359

Description

I'm creating a "Vendors" CSS bundle from node_modules (bootstrap + font-awesome). It correctly creates the vendors.bundle.css file, however, it does not take the additional step of minifying it down to vendors.bundle.min.css like it used to.

Steps to recreate

  1. Include "node_modules" in project
  2. Select the css files to be included in the bundle
  3. Right-click and select Bundle & Minifier => Bundle and Minify files...
  4. Select a folder and file name
  5. Bundled CSS file is properly created, but minified file is missing (It does work for JS)

Current behavior

It generates the bundled css file in non-minified format, despite having "minify" flag set to true.

Expected behavior

Should create both the bundled and minified bundled versions of the CSS file, like it does for JS.

@rockstardev
Copy link
Collaborator

Are you using Bootstrap 4? Because if you are, it's bug I'm in process of fixing: #306

Just first need NUglify team to update dependency. In the meantime workaround is either to migrate to Gulp or remove variables in :root element.

@sweeperq
Copy link
Author

sweeperq commented Apr 7, 2018

@lepipele - Yes, I am using BS4. Thank you for the information.

@sweeperq
Copy link
Author

sweeperq commented Apr 9, 2018

Confirmed that Bootstrap 4 now properly works with the most current version of Bundler & Minifier. Both the bundle and minified bundle are generated.

@sweeperq sweeperq closed this as completed Apr 9, 2018
@morphosic
Copy link

morphosic commented Apr 27, 2018

Version: 2.6.378
This is still an issue for me. JS works fine for minification. CSS is not working. The bundled .css file is generated, but not the minified file. (Foundation 5)

@rockstardev
Copy link
Collaborator

@morphosic check if you have both extension and NuGet DLL referenced in the project. I advise everyone to uninstall extension and just use NuGet DLL - that way solution can bundle on different dev machines.

@morphosic
Copy link

Ok, I'm using nuget instead of plugin but now I get errors:
image
This is from a .css file compiled by the Web Compiler plugin.

@rockstardev
Copy link
Collaborator

Err... not CSS expert, but are you @morphosic sure you are allowed class selectors inside of @-ms-keyframes wiggle?

Could be bug in WebCompiler (https://github.com/madskristensen/WebCompiler)

Well, anyways glad to hear at least now you get error log on why CSS bundling is not working for you ;)

@morphosic
Copy link

Perhaps so... It's being built from this:

image

@rockstardev
Copy link
Collaborator

Yeah, I see you've logged it on: madskristensen/WebCompiler#370

I'll mention it to @madskristensen when we talk... see if anyone can step up to take over WebCompiler since I definitely don't have time to code that also. If you do end up coding Pull Request and sending it - let me know, I can review and merge.

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

No branches or pull requests

3 participants