We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e9003b commit bb4c20dCopy full SHA for bb4c20d
example/nuxt/pages/index.vue
@@ -10,9 +10,7 @@
10
</template>
11
12
<script>
13
-const { createClient } = require('../plugins/microcms.js');
14
-
15
-const client = createClient();
+const { client } = require('../plugins/microcms.js');
16
17
export default {
18
async asyncData() {
example/nuxt/plugins/microcms.js
@@ -1,12 +1,10 @@
1
const { createClient } = require('microcms-js-sdk');
2
3
const config = {
4
- serviceDomain: '',
5
- apiKey: '',
+ serviceDomain: 'service-domain',
+ apiKey: 'api-key',
6
};
7
8
module.exports = {
9
- createClient() {
- return createClient(config);
- },
+ client: createClient(config),
0 commit comments