소개
게시글
질문&답변
2022.09.16
slugfy 한글 제목 주소
해당 모듈 적용해봤는데 한글이 영어발음으로 표기되던데 , 한글그대로 표시되는건 불가능한가용?
- 0
- 2
- 122
질문&답변
2022.09.16
ubuntu 서버에서 postgres 관련 에러
이부분 어떻게 바꿔줘야 하는지 궁금합니다!
- 0
- 3
- 256
질문&답변
2021.12.13
react-hot-loader 적용시 에러가 생깁니다.
var webpack = require ( "webpack" ); module . exports = { mode : "development" , entry : "./src/index.js" , output : { path : __dirname + "/public/" , filename : "bundle.js" , }, devServer : { hot : true , // inline: true, host : "0.0.0.0" , port : 4000 , static : __dirname + "/public/" , }, module : { rules : [ { test : / \. js $ / , loader : "babel-loader" , exclude : /node_modules/ , options : { cacheDirectory : true , presets : [ "@babel/preset-env" , "@babel/preset-react" ], plugins : [ "react-hot-loader/babel" ], }, }, ], }, plugins : [ new webpack . HotModuleReplacementPlugin ()], }; - import React , { Component } from "react" ; import { hot } from "react-hot-loader" ; class App extends Component { constructor ( props ) { super ( props ); this . state = { name : "test" , }; } render () { return ( button onClick = { () => { this . setState ({ name : "Veloport" }); } } > CLICK ME button > div > Hello! { this . state . name } !! div > ); } } export default hot ( module )( App ); - { "name" : "react-fundamentals" , "version" : "1.0.0" , "description" : "" , "main" : "index.js" , "scripts" : { "test" : "echo \" Error: no test specified \" && exit 1" , "dev-server" : "webpack-dev-server" }, "author" : "" , "license" : "ISC" , "dependencies" : { "react" : "^17.0.2" , "react-dom" : "^17.0.2" }, "devDependencies" : { "@babel/cli" : "^7.16.0" , "@babel/core" : "^7.16.0" , "@babel/preset-env" : "^7.16.4" , "@babel/preset-react" : "^7.16.0" , "babel-loader" : "^8.2.3" , "react-hot-loader" : "^4.13.0" , "webpack" : "^5.65.0" , "webpack-cli" : "^4.9.1" , "webpack-dev-server" : "^4.6.0" } }
- 0
- 10
- 642
질문&답변
2021.12.13
webpack 5 대응
도움이 되었습니다 감사합니다 :)
- 10
- 2
- 214
질문&답변
2021.11.16
프록시 설정하여도 404오류가 뜹니다.
아 확인해보니깐 http-proxy-middleware가 버전업이 되서 쓰는 법이 바뀌었네요 ~!!! 좋은 정보 감사합니다 ~!!! 이것에서 const proxy = require( ' http-proxy-middleware ' ) ; module . exports = function ( app ) { app . use ( ' /api ' , proxy ( { target : ' http://localhost:5000 ' , changeOrigin : true , } ) ) ; }; 이걸로 const { createProxyMiddleware } = require( ' http-proxy-middleware ' ) ; module . exports = function ( app ) { app . use ( ' /api ' , createProxyMiddleware ( { target : ' http://localhost:5000 ' , changeOrigin : true , } ) ) ; }; 바꿔주시면 에러가 없어집니다 ^^
- 0
- 3
- 1.6K