Dynamic import of js doesnt work after build

Hello,
I have exact same problem as described here Dynamic Import not working when running `yarn build`, but does with `yarn dev`
There were said that next bud version will hopefully sort it out. Today I upgraded to bud 5.8.3 but I still have same problem. Do I miss something or it is still the problem?
Thank you

1 Like

Dynamic imports work but it looks like automatically setting the public path is still fussy.

Good news is that you can specify your public path in your bud.entry call:

  app
    /**
     * Application entrypoints
     *
     * Paths are relative to your resources directory
     */
    .entry({
      app: {
        import: ["@scripts/app", "@styles/app"],
        publicPath: "/app/themes/sage/public/",
      },
    })
1 Like

Testing on 5.8.4 and I think the standard edition app.setPublicPath('/app/themes/sage/public/') works as well now, if you don’t want to set the path per entrypoint.