@absolute-web/vsf-newleaf 中文文档教程
VSF-Newleaf Integration
Installation
将您的模块添加到
Setup
在 middleware.config.js
文件中注册集成。
module.exports = {
integrations: {
newleaf: {
location: "@absolute-web/vsf-newleaf/server",
configuration: {
apiUrl: process.env.NEWLEAF_API_URL,
},
},
},
};
添加 NEWLEAF_API_URL
变量到 .env 文件
NEWLEAF_API_URL=<API_URL>
在 nuxt.config.js
文件中注册模块。
buildModules: {
[
'@vue-storefront/nuxt',
{
useRawSource: {
dev: [
'@absolute-web/vsf-newleaf',
],
prod: [
'@absolute-web/vsf-newleaf',
],
},
}
],
['@absolute-web/vsf-newleaf/nuxt'],
},
VSF-Newleaf Integration
Installation
Add your module to <Project>/packages
Setup
Register the integration in the middleware.config.js
file.
module.exports = {
integrations: {
newleaf: {
location: "@absolute-web/vsf-newleaf/server",
configuration: {
apiUrl: process.env.NEWLEAF_API_URL,
},
},
},
};
Add NEWLEAF_API_URL
variable to .env file
NEWLEAF_API_URL=<API_URL>
Register the module in the nuxt.config.js
file.
buildModules: {
[
'@vue-storefront/nuxt',
{
useRawSource: {
dev: [
'@absolute-web/vsf-newleaf',
],
prod: [
'@absolute-web/vsf-newleaf',
],
},
}
],
['@absolute-web/vsf-newleaf/nuxt'],
},