Skip to content

Commit bb4c20d

Browse files
committed
fix: nuxt example
1 parent 7e9003b commit bb4c20d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

example/nuxt/pages/index.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@
1010
</template>
1111

1212
<script>
13-
const { createClient } = require('../plugins/microcms.js');
14-
15-
const client = createClient();
13+
const { client } = require('../plugins/microcms.js');
1614
1715
export default {
1816
async asyncData() {

example/nuxt/plugins/microcms.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
const { createClient } = require('microcms-js-sdk');
22

33
const config = {
4-
serviceDomain: '',
5-
apiKey: '',
4+
serviceDomain: 'service-domain',
5+
apiKey: 'api-key',
66
};
77

88
module.exports = {
9-
createClient() {
10-
return createClient(config);
11-
},
9+
client: createClient(config),
1210
};

0 commit comments

Comments
 (0)