简体   繁体   中英

ExtJS - How to disabled minification of specific file

I have an external library file (auth0.js) I need to include in the build but not minify it as it's already minified.

    "js": [
        {
            "path": "app.js",
            "bundle": true
        },
        {
            "path": "auth0.js",
            "bundle": false,
            "includeInBundle": false
        }
    ]

Which property should I use? bundle prevent it from being copied in the classic/modern folder which is good. I tried includeInBundle but it does not help.

I submitted a ticket a while ago figure this but found no resolution. I ended up loading the file manually.

Ext.Loader.loadScript({
            url: "/xxxx.js",  
            onLoad: function() {
                console.log("LOADED A FILE");
            },
            scope: me.getView()
        });

I just reviewed my ticket this was the response:

Setting remote to true and includeInbundle to false will skip the file for compression with Sencha Cmd. In your case if this is not happened then it may be possible as you have mentioned the file under the resources directory. I would recommend to change the directory to some other directory(need to create folder) such as "customResources" and include it in js config of the app.json file.

{ "path": "customResources/froala_editor.pkgd.min.js", "includeInBundle": false "remote": true }

this worked but did not include in the bundle which is what I wanted it to do.

Then they said: Please try changing the compression type to cmd and see if this help you.

that did nothing.

An alternative solution to file compression/bundle is to put a CDN link in index.html.

<script src="https://cdn..."></script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM