yarn create next-app --typescript
{
"editor.formatOnPaste": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"eslint.validate": ["javascript"],
"eslint.workingDirectories": [{ "mode": "auto" }]
}
const nextConfig = {
reactStrictMode: true,
images: {
unoptimized: true
}
}
"export": "next build && next export",
"serve": "serve -d out"
Why? Fix the nextjs project on not root.
Why? import source use @/**
yarn add -D @next/bundle-analyzer cross-env
yarn add next-pwa
"export": "cross-env EXPORT=true next build && cross-env EXPORT=true next export",
"analyze": "cross-env ANALYZE=true next build"
const withBundleAnalyzer = require('@next/bundle-analyzer')({
enabled: process.env.ANALYZE === 'true',
})
const withPWA = require('next-pwa')({
dest: 'public',
disable: process.env.NODE_ENV === 'development',
})
// module.exports = nextConfig
const KEYS_TO_OMIT = ['webpackDevMiddleware', 'configOrigin', 'target', 'analyticsId', 'webpack5', 'amp', 'assetPrefix']
module.exports = (_phase, { defaultConfig }) => {
delete defaultConfig.experimental.outputFileTracingRoot;
delete defaultConfig.i18n;
const plugins = [[withPWA], [withBundleAnalyzer, {}]]
const wConfig = plugins.reduce((acc, [plugin, config]) => plugin({ ...acc, ...config }), {
...defaultConfig,
...nextConfig,
})
const finalConfig = {}
Object.keys(wConfig).forEach((key) => {
if (!KEYS_TO_OMIT.includes(key)) {
finalConfig[key] = wConfig[key]
}
})
return finalConfig
}
rsync --chown=artexb:nginx --delete -avz -e "ssh -i ./felixAdmin2021.pem" ./next root@39.105.95.136:/www/html/wordpress/lab/
yarn add three @types/three @react-three/fiber
index page only render dom scroll page rend dom and canvas both
yarn add @react-three/xr
https://developer.oculus.com/documentation/web/browser-remote-debugging/
cd platform-tools
adb devices
adb reverse tcp:8080 tcp:3000
adb shell ip route adb tcpip 5555 adb connect 192.168.11.150:5555
adb disconnect