Pre-Installation Requirements
Section | ||
---|---|---|
Make sure, the following requirements are met prior to the installation of PWA:
|
Installing and Configuring PWA Studio
1. Use the following command to install PWA Studio:
Code Block |
---|
yarn create @magento/pwa |
Section |
---|
2. Enter any name (no spaces) in response to the "Project root directory" query, For example,"Blog". This will create a directory to host all the files of the installation. |
Section |
---|
3. Enter @magento/venia-concept@10.0.0 in response to the "Which template would you like to use to bootstrap install? Defaults to '@magento/venia-concept'." |
Section |
---|
4. Choose "Other" for the "Magento instance to use as a backend" query |
Section |
---|
5. Enter the address of the Server in response to the "URL of a Magento to use as a backend" query. The address must start https:// |
6. Leave default replies for all the remaining queries.
Note |
---|
Reply "y" to the "Install package dependencies with yarn..."query. |
7. Go to the project folder:
Code Block |
---|
cd <project_name> |
8. Run the following command:
Code Block |
---|
yarn run buildpack create-custom-origin . |
Note |
---|
The command is to end with space and dot. This will ensure that no error will be ignored on running the project. |
Section |
---|
9. Go to the project root directory and find the .env file. Open the file and change the value of the IMAGE_OPTIMIZING_ORIGIN parameter from "auto" into "backend". |
Employing Aheadworks Blog
Note |
---|
Aheadworks Blog (version 2.8.0) and Aheadworks BlogGraphQL extensions, pre-installed on the Server. Though part of the Aheadworks Blog installation package, BlogGraphQl is installed separately. |
Section |
---|
1. Copy the /awBlog/ folder into /src/ |
2. Go to the project root directory and find the local-intercept.js file. Insert the following code into the file:
Code Block |
---|
module.exports = targets => {
targets.of('@magento/venia-ui').routes.tap(routes => {
routes.push({
name: 'Blog',
pattern: '/blog/:name?/:key?',
path: require.resolve('./src/awBlog/components/Blog/blog.js')
});
return routes;
});
}; |
3. Add the following line to /src/store.js
Code Block |
---|
import { awReducerBlog } from './awBlog/redux/reducers/awReducerBlog'; |
4. Change the following line:
Code Block |
---|
const rootReducer = combineReducers(reducers); |
to
Code Block |
---|
const rootReducer = combineReducers({...reducers, awReducerBlog}); |
Employing Aheadworks ARP
Note |
---|
Magento 2.4.2 with https access and with access to Aheadworks Autorelated и Aheadworks AutorelatedGraphQl extensions must be pre-installed on the Server. |
Section |
---|
1. Copy the /awArp/ folder into /src/ |
Section |
---|
2. Go to the end of the project root and find the local-intercept.js file. Insert local-intercept.js from the archive with the extension. |
Note |
---|
Which features are not supported for PWA:
|
Running PWA Studio Project
Section |
---|
Code Block |
---|
yarn run watch |
This will start the Development Server. See the console output for the address of the server.
Run the following command to test the Production version:
Code Block |
---|
yarn build && yarn start |
For more information follow the product user manual on our website
Need Customization?
You can always find the latest version of the software, full documentation, demos, screenshots, and reviews on http://ecommerce.aheadworks.com
License agreement: https://aheadworks.com/end-user-license-agreement
Contact Us: https://aheadworks.com/contact
Copyright © 2021 Aheadworks Co. http://www.aheadworks.com