Base solution for your next web application
Open Closed

v7.0 - Scripts and bundling - webpack/gulp ? #7272


User avatar
0
deltavision created

Hi,

I have problems with bundle.json - it does not create bundle files. Using Core/JQuery project.

Relates to #7133 Link to webpack from the question above - not working / file missing. https://github.com/aspnetzero/aspnet-zero-core/blob/dev/aspnet-core/src/MyCompanyName.AbpZeroTemplate.Web.Mvc/webpack.config.js

But here:

https://github.com/aspnetzero/aspnet-zero-core/commit/84342d45991cc23611fc347b9a51bea0ae9a4de1#diff-9b3e338957ad2546ebe8ef5c19be4776

You changed to gulp instead of webpack What do we need to do, to make bundle work again?

Best Michael


16 Answer(s)
  • User Avatar
    0
    deltavision created

    Hi,

    got it working with webpack - problem was I commented a line (with // ) in the bundle.json file. Looked OK in the VS editor, but "npm run create-bundle" failed...

    So now the bundles build - but the auto generate/update of bundles as in v6.x is not working. I have to manualley run "npm run create-bundle".

    Next problem..., after re-run of "npm run create-bundle" the App goes to this error after login. Maybe something related to .min.css /.min.js - vs: .css/.js, but not sure....

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @deltavision

    Sorry for my late response. Do you see any errors in the browser console on your login page ?

  • User Avatar
    0
    deltavision created

    Hi,

    from Chrome - on EDGE I cannot see any errors (maybe looking in the wrong place...)

  • User Avatar
    0
    alper created
    Support Team

    You need to downgrade the Angular version from v8.1 to v8.0 in yarn.lock.

    See https://support.aspnetzero.com/QA/Questions/7262

  • User Avatar
    0
    deltavision created

    Hi,

    I am using Core Mvc jQuery - so no Angular in yarn.lock - as far as I can see.

  • User Avatar
    0
    alper created
    Support Team

    sorry my fault

  • User Avatar
    0
    deltavision created

    Hi,

    updated my project to 7.1 - so using gulp instead of webpack. Still same issue on login as earlier.

    Looks like auto-generate of bundles is fixed with gulp v7.1

    Console on load login:

    After login - same as before:

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Could you share the output of running "npm run create-bundles" command ?

    Thanks,

  • User Avatar
    0
    deltavision created

    Hi,

    output from command:

  • User Avatar
    0
    deltavision created

    Hi - tried to run "npm run build", just to test "minifie"

    now I get some errors on jquery "=>" syntax

    Don't know if it is related to the other issue

  • User Avatar
    0
    deltavision created

    Hi,

    is it a problem with the load of login.js ?

    I can click - Forgot password, Email activation, New tenant - they are all working

    • but the link to Change (tenant) is not working.

    Still have same errors on Login :

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @deltavision

    You are right, "=>" usage is not supported. Could you send an email to [email protected] so that we can help you via TeamViewer ?

    Thanks,

  • User Avatar
    0
    deltavision created

    Hi,

    I send you an email :-)

    so "arrow function" and eg. "const" is not supported, meaning that JavaScript ES6 is not supported right?

  • User Avatar
    0
    ismcagdas created
    Support Team

    The problem is solved via remote support. It seems like the bundle files are not updated when running npm run create-bundles command. We couldn't find the reason behind it but deleting the previously generated bundles solved the problem. We will investigate this further.

  • User Avatar
    0
    deltavision created

    Hi

    first of all - thank you for your assistance :-)

    Could be because of bundles files was under source control (TFS)? - read-only files, but I am not sure... Anyway bundles folder as with node_modules folder should not be under source control.

    It would be nice to get a warning if "npm run create-bundles" can't update the bundle files.

    Another lesson learned (with gulp and ANZ 7.1) - JavaScript ES6 is not supported. Fx. "arrow function" and "const".

    Thanks

  • User Avatar
    0
    deltavision created

    Closing the case.