{"title":"Enable Lightning Web Security for StoreConnect","slug":"enable-lightning-web-security","url":"https://support.storeconnect.com/articles/enable-lightning-web-security","url_markdown":"https://support.storeconnect.com/articles/enable-lightning-web-security.md","subtitle":null,"summary":"Enable Lightning Web Security (LWS) in your Salesforce org before installing StoreConnect. LWS is required because the StoreConnect package uses dynamic imports in Lightning Web Components.","type":"Help_Documentation","video_url":"","keywords":"LWS, Lightning Web Security, LWC1503, dynamic imports, installation prerequisite, session settings","last_modified":"2026-08-21T07:12:35+0000","body_markdown":"Use this process to turn on Lightning Web Security (LWS) in your Salesforce org before you install StoreConnect. StoreConnect uses dynamic imports in its Lightning Web Components, and Salesforce only allows dynamic imports when LWS is enabled. Installation fails without it.\n\nLWS is an org-wide setting that is on by default in Salesforce orgs created after 2023. If your org predates that, check the setting before [installing StoreConnect](quick-start).\n\n## Before you begin\n\n- You need to be logged in to Salesforce as a System Administrator.\n- LWS applies to every Lightning component in the org, not just StoreConnect. If you have other custom or managed components, check them for compatibility first. Salesforce provides a [compatibility tool](https://developer.salesforce.com/docs/platform/lightning-components-security/guide/lws-enable.html) in Setup.\n\n## Enable Lightning Web Security\n\n1. Go to **Setup** \u003e **Session Settings**.\n2. Scroll to the **Lightning Web Security** section.\n3. Select **Use Lightning Web Security for Lightning web components and Aura components**.\n4. Select **Save**.\n5. Clear your browser cache. The setting can take a couple of minutes to take effect across the org.\n6. Return to **Setup** \u003e **Session Settings** and confirm **Use Lightning Web Security for Lightning web components and Aura components** is now selected. LWS is active once the checkbox stays selected after the page reloads.\n\n## Install StoreConnect\n\nOnce LWS is active, retry the [StoreConnect installation on AppExchange](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FMkeKUAT). The installation completes without the `LWC1503` error.\n\n:::note\nLWS is backward compatible with most components. If you find that your other apps or components are affected, you can switch LWS off, resolve the issue in those apps, and switch it on again. StoreConnect cannot be installed while LWS is off.\n:::\n\n## LWC1503 error\n\nIf the installation fails with `LWC1503: Dynamic imports are not allowed`, LWS is not enabled. Enable it using the steps above, clear your browser cache, then retry the installation from AppExchange. No data or setup information in your org is affected by a failed installation attempt."}