-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: webpack 캐시를 활용한 빌드 속도 개선 (#672) * chore: dev환경 webpack 설정 구현 * chore: common환경 webpack 설정 구현 * chore: prod환경 webpack 설정 구현 * chore: 기존 웹팩 환경 파일 제거 * chore: 불필요한 babelrc 파일 제거 * chore: 빌드 명령어 변경 및 사용하지 않는 라이브러리 제거 * chore: 타입체킹에 실패하면 빌드가 되지 않도록 설정 * fix: 모달 열기 이벤트 동작 안하는 에러 (#675) * chore: dev환경 webpack 설정 구현 * chore: common환경 webpack 설정 구현 * chore: prod환경 webpack 설정 구현 * chore: 기존 웹팩 환경 파일 제거 * chore: 불필요한 babelrc 파일 제거 * chore: 빌드 명령어 변경 및 사용하지 않는 라이브러리 제거 * chore: 타입체킹에 실패하면 빌드가 되지 않도록 설정 * fix: 페이지 code 스플리팅으로 인한 suspense 오류 해결 * fix: axios 401 에러로 인한 주석 처리 * fix: 간헐적 에러 발생 오류 해결 #674 * refactor: 변경된 모달 컴포넌트 적용 * fix: 모달 content 내용 넘어가는 버그 해결 * fix: modal 버전 업그레이드 및 필요없는 파일 제거
- Loading branch information
Showing
26 changed files
with
1,021 additions
and
1,163 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
const path = require('path'); | ||
const Dotenv = require('dotenv-webpack'); | ||
const { merge } = require('webpack-merge'); | ||
|
||
const common = require('./webpack.common'); | ||
|
||
module.exports = merge(common, { | ||
mode: 'development', | ||
devtool: 'eval-cheap-module-source-map', | ||
cache: { | ||
type: 'filesystem', | ||
}, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js|jsx|ts|tsx)$/i, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader', | ||
options: { | ||
cacheCompression: false, | ||
cacheDirectory: true, | ||
presets: ['@babel/preset-env', ['@babel/preset-react', { runtime: 'automatic' }], '@babel/preset-typescript'], | ||
plugins: [ | ||
['babel-plugin-styled-components'], | ||
[ | ||
'babel-plugin-root-import', | ||
{ | ||
rootPathPrefix: '~', | ||
rootPathSuffix: 'src', | ||
}, | ||
], | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
plugins: [ | ||
new Dotenv({ | ||
path: path.resolve(__dirname, `../.msw.env`), | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
const path = require('path'); | ||
const Dotenv = require('dotenv-webpack'); | ||
const { merge } = require('webpack-merge'); | ||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin'); | ||
|
||
const common = require('./webpack.common'); | ||
|
||
module.exports = merge(common, { | ||
mode: 'production', | ||
devtool: false, | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(js|jsx|ts|tsx)$/i, | ||
exclude: /node_modules/, | ||
loader: 'babel-loader', | ||
options: { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { browsers: ['last 2 versions', '>= 5% in KR'] }, | ||
useBuiltIns: 'usage', | ||
corejs: { | ||
version: 3, | ||
}, | ||
}, | ||
], | ||
['@babel/preset-react', { runtime: 'automatic' }], | ||
'@babel/preset-typescript', | ||
], | ||
plugins: [ | ||
[ | ||
'babel-plugin-styled-components', | ||
{ | ||
displayName: false, | ||
minify: true, | ||
transpileTemplateLiterals: true, | ||
pure: true, | ||
}, | ||
], | ||
[ | ||
'babel-plugin-root-import', | ||
{ | ||
rootPathPrefix: '~', | ||
rootPathSuffix: 'src', | ||
}, | ||
], | ||
], | ||
}, | ||
}, | ||
], | ||
}, | ||
optimization: { | ||
splitChunks: { | ||
chunks: 'all', | ||
}, | ||
}, | ||
plugins: [ | ||
new ForkTsCheckerWebpackPlugin(), | ||
new Dotenv({ | ||
path: path.resolve(__dirname, `../.prod.env`), | ||
}), | ||
], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,29 @@ | ||
import { Suspense } from 'react'; | ||
import { styled } from 'styled-components'; | ||
import LoadingIndicator from '~/components/@common/LoadingIndicator'; | ||
|
||
import Router from './router/Router'; | ||
|
||
function App() { | ||
return <Router />; | ||
return ( | ||
<Suspense | ||
fallback={ | ||
<StyledProcessing> | ||
<LoadingIndicator size={64} /> | ||
</StyledProcessing> | ||
} | ||
> | ||
<Router /> | ||
</Suspense> | ||
); | ||
} | ||
|
||
export default App; | ||
|
||
const StyledProcessing = styled.div` | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
height: 100vh; | ||
`; |
Oops, something went wrong.