Skip to content

Instantly share code, notes, and snippets.

View wataruoguchi's full-sized avatar
🦥
Curiosity Driven

Wataru Oguchi wataruoguchi

🦥
Curiosity Driven
View GitHub Profile
babel: {
presets: [
'es2015',
'stage-0'
],
plugins: [
['transform-runtime', {
'polyfill': true,
'regenerator': true,
}]
$ # make sure you're in src directory
$ # install babel plugins
$ yarn add -D babel-plugin-module-resolver babel-plugin-transform-runtime babel-preset-es2015 babel-preset-stage-0
$ # edit the file
$ vi nuxt.config.js
$ # make sure you're in src directory
$ # In the video, he's using isomorphic-fetch
$ # However, Nuxt.js strongly recommends using axios, so here we go
$ yarn add axios
$ # Clear index.vue and edit the file
$ echo '' > pages/index.vue && vi pages/index.vue
$ # install vue-cli and yarn
$ sudo npm i -g vue-cli yarn
$ # Create Nuxt app project in src directory based on nuxt-community/starter-template
$ vue init nuxt-community/starter-template src
$ # The answer can be all default
- ? Generate project in current directory?
- ? Project name
- ? Project description
- ? ? Author
$ # move to src directory, then install npm packages
@wataruoguchi
wataruoguchi / 1.sh
Last active December 9, 2018 22:17
Firebase公式動画を参考にFirebaseとNuxt.jsを使ってSSRをServerlessで実現する ref: https://qiita.com/wataruoguchi/items/fa9b59e21c4212293c04
$ # プロジェクト用のフォルダ(<proj>、任意に決めてください)を作って、そのフォルダの中へ移動。
$ mkdir <proj> && cd $_