Integrate Google Sign-in (Popup method) with Nuxt.js - Works in Incognito mode as well
Nuxt 3 version here.
export default {
...
Integrate Google Sign-in (Popup method) with Nuxt.js - Works in Incognito mode as well
export default {
...
/* Ultra lightweight Github REST Client */ | |
// original inspiration via https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb | |
const token = 'github-token-here' | |
const githubClient = generateAPI('https://api.github.com', { | |
headers: { | |
'User-Agent': 'xyz', | |
'Authorization': `bearer ${token}` | |
} | |
}) |
import { readonly, ref, watch } from 'vue' | |
import { useMutationObserver } from '@vueuse/core' | |
export function useQuerySelector(selector, { root = document } = {}) { | |
selector = ref(selector) | |
root = ref(root) | |
const result = ref(null) | |
// Find first matching element inside a root element |
import { preprocess } from 'svelte/compiler' | |
/** | |
* @typedef {import("svelte/types/compiler/preprocess").PreprocessorGroup} PreprocessorGroup | |
* @param {PreprocessorGroup[]} preprocessors | |
* @returns {PreprocessorGroup[]} | |
*/ | |
export function sequence(preprocessors) { | |
return preprocessors.map((preprocessor) => ({ | |
markup({ content, filename }) { |
<script lang="ts"> | |
import { defineComponent, onMounted, PropType, ref, watch } from "vue"; | |
type VoidFunction = () => void; | |
const isBrowser = () => { | |
return typeof window === "object"; | |
}; | |
export default defineComponent({ | |
props: { |
I would very much like there to be a WEB standard for this, but unfortunately there is not!
I studied this for several days and gathered a lot of information and I will share it with you.
Before developing or using an internet hack you need to know that there are 2 types of Autocomplete. There is the autocomplete of the page and the autocomplete of the browser.
This is the global browser autocomplete. It appears whenever you define autocomplete="off"
or when you define no autocomplete but define type="email"
for example. The global autocomplete suggests emails you've used on other sites. The global autocomplete has a manage button at the bottom and can be disabled in the browser config.
// .eslintrc | |
{ | |
"env": { | |
"browser": true, | |
"es6": true, | |
"node": true | |
}, | |
"extends": [ | |
"react-app", | |
"plugin:react/recommended", |
// try it : https://codesandbox.io/s/sample-next-ts-rhf-zod-9ieev | |
import React from "react"; | |
import { useForm } from "react-hook-form"; | |
import { zodResolver } from "@hookform/resolvers/zod"; | |
import { z } from "zod"; | |
import type { FieldError } from "react-hook-form"; | |
// JSON.stringify(error) will not work, because of circulare structure. So we need this helper. |
module.exports = { | |
presets: [ | |
['@babel/preset-env', { | |
useBuiltIns: 'usage', | |
debug: false, | |
loose: true, | |
corejs: { | |
version: 3, | |
proposals: true, | |
}, |
tsconfig.json
の設定についてのメモ書きです。
target は 変換後のコードのECMAScriptバージョンを指定する
たとえば、Node.js 14はES2020をサポートしている。そのため、Node.js 14向けのコード(サーバなど)ならtarget: "ES2020"
を指定することで、余計なTranspileが省かれててコードサイズや実行時間が最適化される。