Open Closed

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


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)
  • 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....

    2019-07-10_14-11-22.jpg

  • 0
    ismcagdas created

    Hi @deltavision

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

  • 0
    deltavision created

    Hi,

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

    2019-07-16_18-17-12.jpg

  • 0
    alper created

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

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

  • 0
    deltavision created

    Hi,

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

  • 0
    alper created

    sorry my fault

  • 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: 2019-07-30_21-10-06.jpg

    After login - same as before: 2019-07-30_17-16-22.jpg

  • 0
    ismcagdas created

    Hi,

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

    Thanks,

  • 0
    deltavision created

    Hi,

    output from command:

    2019-07-31_16-41-05.jpg

  • 0
    deltavision created

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

    now I get some errors on jquery "=>" syntax 2019-07-31_17-08-56.jpg

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

  • 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 :

    2019-08-05_10-45-40.jpg

  • 0
    ismcagdas created

    Hi @deltavision

    You are right, "=>" usage is not supported. Could you send an email to info@aspnetzero.com so that we can help you via TeamViewer ?

    Thanks,

  • 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?

  • 0
    ismcagdas created

    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.

  • 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

  • 0
    deltavision created

    Closing the case.