Skip to content

Bundling and Minification (ASP.NET 4.x) example does not minimize and bundle #633

@siulca

Description

@siulca

The example Bundling and Minification (ASP.NET 4.x) does not work as advertised. Bundled jsx files are not bundled into a single file and they are also not minified.

The following:

bundles.Add(new Bundle("~/bundles/main", new IBundleTransform[]
            {
                // This works the same as BabelBundle (transform then minify) but you could
                //add your own transforms as well.
                new BabelTransform(),
                new JsMinify(),
            }).Include(
                // Add your JSX files here
                "~/Scripts/Tutorial.jsx",
                "~/Scripts/Test.jsx"

                // You can include regular JavaScript files in the bundle too
                //"~/Content/ajax.js"
            ));

Gets rendered as two files, not bundled together:

image

Each file contains the full non-minified script. In fact there's a further bug. The content of Test.jsx is now inside of Tutorial.jsx and vice-versa!

As it stands Babel Bundling is pointless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions