liffページをvuex,vue-routerを用いて作成したいです。
下記方法で実現しようとしたところ、以下のエラーが発生しビルドエラーが発生します。
エラー内容
ERROR Failed to compile with 1 errors error in ./src/App.vue
Module Error (from ./node_modules/eslint-loader/index.js):
C:\src\App.vue
29:5 error 'liff' is not defined no-undef
39:13 error 'err' is defined but never used no-unused-vars✖ 2 problems (2 errors, 0 warnings)
■実現方法
vue-cliで以下の設定でvueをcreateしました
? Please pick a preset: Manually select features
? Check the features needed for your project: Babel, PWA, Router, Vuex, CSS Pre-processors, Linter
? Use history mode for router? (Requires proper server setup for index fallback in production) Yes
? Pick a CSS pre-processor (PostCSS, Autoprefixer and CSS Modules are supported by default): Sass/SCSS (with node-sass)
? Pick a linter / formatter config: Basic
? Pick additional lint features: (Press <space> to select, <a> to toggle all, <i> to invert selection)Lint on save
? Where do you prefer placing config for Babel, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No
・body最下部にてLIFFのCDNを読み込み
・App.vueのcreated()にてliffを起動
https://github.com/zentsumethod/liff-github
あなたの回答
tips
プレビュー