본문 바로가기

Programming/JavaScript52

React App 빌드시 sourcemap 파일 제외하기 React App 빌드시 sourcemap 파일 제외하기 https://github.com/facebook/create-react-app/issues/2005 I figured it out. Looks like we have to eject to disable the source maps inside of our production webpack config. Steps are outlined below.. 1. Eject your create-react-app by running npm run eject 2. Open /config/webpack.config.prod.js 3. Remove or comment out line 53 containing devtool: 'source-map'.. 2018. 4. 22.
React App Github Deploy React App Github Deploy https://github.com/gitname/react-gh-pages gh-pages 설치 $ npm install gh-pages --save-dev package.json 수정 package.json 파일에 scripts를 추가합니다. predeploy : 배포 이전 빌드를 위한 스크립트 입니다. deploy : 배포를 위한 스크립트 입니다. // package.json { "scripts": { "start": "cross-env NODE_PATH=src NODE_ENV=development node scripts/start.js", "build": "cross-env NODE_PATH=src NODE_ENV=production node scripts.. 2018. 4. 21.
firestore & storage 사용하기 firestore & storage 사용하기 firestore 에는 문서를 저장하고, storage 에는 파일을 저장합니다. firestore에 파일도 저장할 수 있지만 2MiB 제한이 있습니다. firstore 저장소 사용하기 데이터베이스 선택: Cloud Firestore 또는 실시간 데이터베이스 프로젝트 생성 firebase console에서 새 프로젝트를 생성합니다. 웹 앱에 Firebase 추가를 눌러서 config 정보를 확인할 수 있습니다. firebase 설치 yarn 으로 설치하였습니다. $ yarn add firebase 파일 추가 프로젝트에서 firebase를 사용하기 위한 파일들을 추가합니다. 위에서 얻은 정보를 입력합니다. apiKey 등등. // firebaseConfig.js .. 2018. 4. 20.
[React.JS] 작업환경 설정하는 중 에러 [React.JS] 작업환경 설정하는 중 에러 ReactDOM is not defined bundle.js:sourcemap:10843 Uncaught ReferenceError: ReactDOM is not defined at Object. (bundle.js:sourcemap:10843) at __webpack_require__ (bundle.js:sourcemap:679) at fn (bundle.js:sourcemap:89) at Object. (bundle.js:sourcemap:1885) at __webpack_require__ (bundle.js:sourcemap:679) at module.exports (bundle.js:sourcemap:725) at bundle.js:sourcemap:.. 2018. 1. 26.
[Leaflet] 플러그인 heatmap.js 사용하기 [Leaflet] 플러그인 heatmap.js 사용하기 heatmap.js를 사용하여 heatmap을 표현해 보겠습니다. https://www.patrick-wied.at/static/heatmapjs/example-heatmap-leaflet.html 에서 예제를 확인할 수 있습니다. Leaflet CSS, JS 추가 leaflet 사용을 위해서 css, js를 포함하는 기본 코드를 작성합니다. leaflet-heatmap.html(또는 원하는 파일명)로 파일을 저장합니다.leaflet에서 heatmap.js를 사용하여 표현하기 위해서는 heatmap.js 와 leaflet-heatmap.js를 추가합니다. 지도 영역 추가 지도 생성 스크립트 오픈스트리트맵('http://tile.openstreetma.. 2018. 1. 15.
[Leaflet] 플러그인 PolylineDecorator 사용하기 [Leaflet] 플러그인 PolylineDecorator 사용하기 Leaflet 플러그인 중에서, Markers & renders에 있는 Leaflet.PolylineDecorator를 사용하여 폴리라인을 꾸며보겠습니다.https://github.com/bbecquet/Leaflet.PolylineDecorator 깃헙 페이지에서 사용법을 확인할 수 있습니다. 간단하게 사용하기 위해 CDN(https://cdnjs.com/libraries/leaflet-polylinedecorator)에 있는 leaflet-polylinedecorator.js를 사용하겠습니다. Leaflet CSS, JS 추가 leaflet 사용을 위해서 css, js를 포함하는 기본 코드를 작성합니다. leaflet-polyline.. 2018. 1. 14.