본문 바로가기

반응형

삽질한것들

(5)
wsl2 localhost <=> wsl2 host github.com/parcel-bundler/parcel/issues/4677 HMR is not working with WSL 2, WINDOWS 10 2004 · Issue #4677 · parcel-bundler/parcel 🐛 bug report HMR is not working with parcel and WSL 2. I tried both parcel v1 and v2, results are the same. 🎛 Configuration (.babelrc, package.json, cli command) command: parcel src/index.html I di... github.com 요약 1. 예전 버전 wsl2 기준으로 wsl2 ip localhost 간에 연결 안되는 이슈 있었음..
BACKEND DEVOPS 세팅 삽질 기본적으로 운영체제가 window이므로 wsl2 기반에서 작업하는도중이다. ( ec2에 올릴거고 아무리 docker 사용한다 한들 local 테스트 환경도 세팅할 계획이기 때문 ) 현재 쓰고있는 visual studio code를 기준으로 설명하겠다. WSL과 WINDOW를 나누는 기준 window10에서 wsl2를 사용할경우 기존의 c, d 등의 하드 드라이브들의 경로는 다음과 같이 된다. /mnt/c/... /mnt/d/... / (root path) 에는 기본적으로 여타 unix 기반 운영체제처럼 /var /etc /root 등의 폴더가 있고 window에서 wsl과의 환경을 나누는 기준은 요 /mnt/ 뒤에있는 폴더들이다. 따라서 visual studio code 텍스트 에디터 기준으로는 다음과 ..
Vue extends, mixin의 "자세한" 차이 1. 오해 mixin과 extend는 둘다 같은 병합전략 사용 (부모 > 자식) mixin은 "다중상속" 가능 하지만 style, template 못가져옴 ( 기능적인 부분 분리 ) extends는 "하나만" 상속 가능 하지만 style, template 가져올수 있다. ( 기능 + ui or ui 분리 ) 2. 삽질 오지게한 결과 알아낸 것들 extend를 사용했을 경우 mounted, created, destoryed 등의 lifecycle은 "통합" 된다. 즉 가져오는 com과 사용하는 com 둘다 설정했을때 2번 실행됨 그 외 name, method들은 통합이 안된다!! 당연한 얘기겠지만 extend를 사용했을경우 template는 통합 안됨 "ui적인 부분"(style)을 분리하기 위해 따로 뺏..
vue cli 3 sass resource 공유 공식문서에 따르면 module.exports = { css: { loaderOptions: { css: { // options here will be passed to css-loader }, postcss: { // options here will be passed to postcss-loader }, sass: {}, ... } } } 이런식으로 추가한다음 넣어주는 option 값은 각각의 loader를 보고 삽입하라고 했다. 또한 공식문서에서는 sass loader에는 additionalData 라는 option이 있으며 이것을 이용해서 variable을 공유하는 sass 하나를 자동으로 추가해주라는 말이 있었는데 공식문서대로 하니까 에러뜨고 난리났다 ( 기준 버전 vue-cli@4.x ) 에러 메..
[javascript] Array.fill 포인터 문제 this.state = { stage: new Array(stageX).fill( new Array(stageY).fill({ background: '', settle: false }) ) , .... } 자 요놈은 Tetris에서 state constructor 내부 분장이다. 실행시키면 다음과 같은 결과가 나온다. concatStageByBlock ({ pos, background }: { pos: [number, number][]; background: string }, isSettle: boolean, stage?: ModelStage): ModelStage { const copyStage = stage ? [...stage] : [...this.state.stage] pos.forEach(pos..

반응형