Open Closed

VS2022 - WebCompiler and BundlerMinifier #10802


0
deltavision created

Hi,

Version: 9.0.1, ASP NET CORE, MVC

With reference to #7666

Started using VS2022.

  • and the "old" Web Compiler from Mads Kristensen (less -> css) is no longer supported. https://marketplace.visualstudio.com/items?itemName=MadsKristensen.WebCompiler

But is continued by Jason Moore at: https://marketplace.visualstudio.com/items?itemName=Failwyn.WebCompiler64&ssr=false#overview

Is that also what you are using / recommend?

Regarding Bundler & Minifier - is that used anymore? https://marketplace.visualstudio.com/items?itemName=MadsKristensen.BundlerMinifier

Is that not handled by "gulp" ?


4 Answer(s)
  • 0
    ismcagdas created
    Support Team

    Hi @deltavision

    You don't need to use WebCompiler and BundlerMinifier. As you stated, gulp task handles less to css converstion. But, if you need to use those extensions for other purposes, I tried them with VS 2022 and worked for me in 2-3 weeks ago.

  • 0
    deltavision created

    Hi @ismcagdas,

    I can not see that gulp transforms any new less files to css. Do I have to set something up on new files (less) ?

    Any changes to the build scripts?

    For Development (create-bundles)

    set projectDir= [....path...]
    
    set workingDir=C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\Tools\
    set vs=VsDevCmd.bat
    
    cd %workingDir%
    start /b %vs%
    
    :: your commands go here, such as:
    d:
    cd %projectDir%
    npm run create-bundles
    
    

    For Production (build)

    set projectDir=[....path...]
    
    set workingDir=C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\Tools\
    set vs=VsDevCmd.bat
    
    cd %workingDir%
    start /b %vs%
    
    :: your commands go here, such as:
    d:
    cd %projectDir%
    npm run build
    
    
  • 0
    ismcagdas created
    Support Team

    Hi,

    Yes, you need to add new style files to bundles.json file.

  • 0
    deltavision created

    Hi,

    how do we indicate that in bundles.json? - just change the file extensions from css to less or how?