Storefront
Last updated
Was this helpful?
Last updated
Was this helpful?
is capable of being bundled into the storefront.
Creating a storefront build is simple. It works out-of-the-box with any application created using Create ScandiPWA App. All you need to do is to bundle it using the .
The main challange of deploying ScandiPWA as a storefront is to properly configure the . This is automatically done in development, however in production, you must configure it yourself.
To deploy an application to the FREE ScandiPWA static-hosting, you can use ScandiPWA CLI. In order to do it, simply type-in following command from your theme's root:
This will return you a link to your instance and update the package.json
file with the scandipwa.staticDeploy
field. This field makes you application deployment persistent. Next time you run this command, the changes will be reflected on the same instance.
The application will proxy all requests to the Magento server you defined in the proxy
field of your package.json
.
This approach is a little-bit more complex. In order to do it you will need to install the express
server and http-proxy-middleware
as your theme's dependency. To do it, run:
Then create a new file server.js
in the application root. Inside, paste following:
The application will proxy all requests to the Magento server you defined in the proxy
field of your package.json
.
Now, . Then, start the server: