Skip to main content

FrontEnd

100vh problem with iOS Safari

//js
const appHeight = () => {
const doc = document.documentElement;
doc.style.setProperty('--app-height', `${window.innerHeight}px`);
};
window.addEventListener('resize', appHeight);
appHeight();
/*css*/
:root {
--app-height: 100%;
}

html,
body {
padding: 0;
margin: 0;
overflow: hidden;
width: 100vw;
height: 100vh;
height: var(--app-height);
}

ESLint

{
// note you must disable the base rule as it can report incorrect errors
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['error'],
}

Rollup

  • (!) Entry module "src/main.js" is implicitly using "default" export mode...
 //rollup.config.js exports: "auto"
export default {
input: 'src/main.js',
output: [
{
dir: 'lib',
format: 'cjs',
exports: "auto",
},
],
...
};

husky

  • Command not found
# ~/.huskyrc
# This loads nvm.sh and sets the correct PATH before running hook
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"