Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(vue-vite-blank): replace vue3-plugin by composables-next * chore: install api-client * chore: changeset * Update packages/vue3-plugin/README.md --------- Co-authored-by: Patryk Tomczyk <13100280+patzick@users.noreply.github.com>
- Loading branch information
Showing
7 changed files
with
37 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"vue-vite-blank": patch | ||
--- | ||
|
||
Change the way how Shopware Context plugin is created |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@shopware-pwa/vue3-plugin": patch | ||
--- | ||
|
||
Mark package as deprecated |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Frontends plugin for Vue 3 | ||
|
||
## ⚠️ DEPRECATED | ||
|
||
The plugin can be created by using `createInstance` method of `@shopware-pwa/composables-next` package. [See the details](https://www.npmjs.com/package/@shopware-pwa/composables-next). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
import { createApp } from "vue"; | ||
import "./style.css"; | ||
import App from "./App.vue"; | ||
import ShopwareContext, { | ||
ShopwareFrontendsOptions, | ||
} from "@shopware-pwa/vue3-plugin"; | ||
|
||
import { createShopwareContext } from "@shopware-pwa/composables-next"; | ||
import { createInstance } from "@shopware-pwa/api-client"; | ||
|
||
const apiInstance = createInstance({ | ||
endpoint: import.meta.env.VITE_DEMO_API_URL, | ||
accessToken: import.meta.env.VITE_DEMO_API_ACCESS_TOKEN, | ||
}); | ||
|
||
const app = createApp(App); | ||
|
||
// setup shopware plugin | ||
const options: ShopwareFrontendsOptions = { | ||
shopwareEndpoint: import.meta.env.VITE_DEMO_API_URL, | ||
shopwareAccessToken: import.meta.env.VITE_DEMO_API_ACCESS_TOKEN, | ||
}; | ||
// register the plugin | ||
app.use(ShopwareContext, options); | ||
const shopwareContext = createShopwareContext(app, { | ||
apiInstance, | ||
// devStorefrontUrl: "https://your-sales-channel-configured-domain.com", | ||
}); | ||
|
||
// register a plugin in a Vue instance | ||
app.use(shopwareContext); | ||
|
||
app.mount("#app"); |
f10cab7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
frontends-demo – ./templates/vue-demo-store
frontends-demo-shopware-frontends.vercel.app
frontends-demo.vercel.app
frontends-demo-git-main-shopware-frontends.vercel.app
f10cab7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
shopware-frontends-docs – ./
shopware-frontends-docs-shopware-frontends.vercel.app
shopware-frontends-docs.vercel.app
shopware-frontends-docs-git-main-shopware-frontends.vercel.app
frontends.shopware.com