We are building web form using lwc framework. We plan to publish it as public on the Community. It's basically visualforce page + aura app + lwc component. We found that Salesforce runs few heavy scripts in background:

  • aura_prod.js - 203 KB
  • app.js?ltngOut=true 95 KB
  • appcore.js?ltngOut=true - 30 KB

Is it possible to turn them off somehow?

  • are you using lightning out? – Rahul Gawale Dec 27 '19 at 14:27
  • 2
    LWC uses aura_prod.js file as well – Oleh Berehovskyi Dec 27 '19 at 14:36
  • @rahulgawale yes, we are. – Eugene Vabishchevich Dec 27 '19 at 14:40
  • 1
    @Eugene Vabishchevich it seems there are no options to do that. – Oleh Berehovskyi Dec 27 '19 at 14:48
  • 1
    you can't remove it. You could have removed only (app.js?ltngOut=true 95 KB appcore.js?ltngOut=true - 30 KB) if you were using lightning community and community page with lwc inside it – Rahul Gawale Dec 27 '19 at 16:59

Aura is the underlying runtime for Lightning. As in, all of it, LWC and "Aura Components" alike. If you check out this post, you'll see this graphic:

Aura and LWC Programming Models

The blue area represents the Aura framework, and the orange is the browser's native API and standards. aura_prod.js is the Aura framework, and is absolutely required to do anything with Lightning. Both Aura and LWC depends on this file to make anything happen.

The other two are required to provide a container for for the components to operate in. They are not loaded in Salesforce itself, because we get one.app instead. All components need to live in an "app", which Salesforce provides, but Lightning Out doesn't have an app by default, so it needs those scripts to provide a container.

  • thanks! We are thinking about the best solution for publishing web-form based on lwc framework. Our current idea is to use visualforce page with aura app + lwc components on the public community access (that is similar to force.com sites). Do we have any other options? – Eugene Vabishchevich Dec 28 '19 at 9:23
  • @EugeneVabishchevich If you're using LWC open-source, you don't need all the extras. It might be worth the trouble to examine that route instead. It'd be much more lightweight. – sfdcfox Dec 28 '19 at 9:48
  • right now we are using native salesforce LWC. I wanted to go with native solution but seems like it's heavy to load. The open-source version is just an idea. Do you think it's better to go with open-source in visualforce and make all apex as rest service? – Eugene Vabishchevich Dec 28 '19 at 10:10
  • what do you think? – Eugene Vabishchevich Dec 29 '19 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.