Skip to content

Commit

Permalink
๐ŸŽ‰ React v17, mui ์—…๊ทธ๋ ˆ์ด๋“œ, Webpack ์ตœ์ ํ™” (#195)
Browse files Browse the repository at this point in the history
* ๐ŸŽ‰ react v.17, material-ui v.5 ์—…๋ฐ์ดํŠธ, ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜

* โšก ๋ฐ์ดํŠธํ”ผ์ปค ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋ณ€๊ฒฝ

* ๐Ÿ› MobileDatePicker ๋ชจ๋‹ฌ ๋‚ ์งœ ๋ณ€๊ฒฝ ๋ฐ˜์˜ ์ˆ˜์ •

* โšก material v5 ๋ฐ˜์˜ ๋ฐ ์—…๋ฐ์ดํŠธ, DatePicker์— moment ๋ฐ˜์˜

* โ™ป๏ธ mui ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์—…๋ฐ์ดํŠธ & Searchbar ๋ฐ์ดํŠธํ”ผ์ปค ๋ฐ˜์˜

* ๐Ÿ› ๋ฉ”์œ  ์—…๋ฐ์ดํŠธํ•˜๋ฉด์„œ ๊นจ์ง€๋Š” ์Šคํƒ€์ผ ์ˆ˜์ •

* ๐Ÿ› material-ui ์—…๋ฐ์ดํŠธ ๊ธ€๋กœ๋ฒŒ ์Šคํƒ€์ผ ๋งˆ์ด๊ทธ๋ ˆ์ด์…˜

* โœจ ๋ฐฉ๋ฌธ๊ธฐ๋ก ๋‚ ์งœ๊ฒ€์ƒ‰ ๋‚ ์งœ ํด๋ฆญ์‹œ ๋ชจ๋‹ฌ ๋‹ซํžˆ๊ธฐ

* โšก mui ๋ฒ„์ „ ์—…๋ฐ์ดํŠธ ๋ฐ˜์˜, nvmrc ์ถ”๊ฐ€

* โšก nvmrc ์‚ญ์ œ ๋ฐ node v16 ์—…๋ฐ์ดํŠธ

* ๐Ÿ› ์„œ๋ฒ„์‹คํ–‰ ์—๋Ÿฌ ๊ด€๋ จ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์ถ”๊ฐ€

* โ™ป๏ธ lint ๋ช…๋ น์–ด ์ˆ˜์ • ํ›„ ์ „์ฒด ํŒŒ์ผ lint ์‹คํ–‰

* โœจ ProgressBarPlugin ์„ค์น˜

* โ™ป๏ธ webpack ๊ฐœ์„  : cahce, souremap, resolve ์ˆ˜์ •

* โœจ craco-esbuild ์ถ”๊ฐ€ํ•ด์„œ esbuild-loader๋กœ ๋ฒˆ๋“ค๋ง

* โ™ป๏ธ webpack5๋ฒ„์ „์—๋งŒ ์žˆ๋Š” cache ์†์„ฑ ์ œ๊ฑฐ

* โœจ eslint, prettier ์žฌ์„ค์ • ๋ฐ ์ ์šฉ

* โœจ sass ์ถ”๊ฐ€: m1 ๋งฅ๋ถ๊ณผ node-sass ์ด์Šˆ๋•Œ๋ฌธ์— ์ถ”๊ฐ€

* ๐Ÿ› webpackConfig.resolve ๋ฒ„๊ทธ ํ•ด๊ฒฐ

* ๐Ÿ› package-lock ํŒŒ์ผ ์—…๋ฐ์ดํŠธ

* ๐Ÿ› ์„œ๋ฒ„์‹คํ–‰ ๋ฒ„๊ทธ & ์Šคํฌ๋กค css ์ˆ˜์ •

Co-authored-by: anxiubin <[email protected]>
  • Loading branch information
leesoo7595 and anxiubin authored May 3, 2022
1 parent 7d76dbc commit 882884b
Show file tree
Hide file tree
Showing 67 changed files with 34,056 additions and 10,184 deletions.
13 changes: 10 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const path = require('path')

module.exports = {
root: true,
extends: ['react-app', 'plugin:prettier/recommended'],
plugins: ['react-hooks', 'import', 'prettier'],
extends: ['eslint:recommended', 'plugin:react/recommended', 'eslint-config-prettier', 'plugin:prettier/recommended'],
plugins: ['react', 'react-hooks', 'import', 'prettier'],
env: {
browser: true,
node: true,
Expand Down Expand Up @@ -37,6 +37,8 @@ module.exports = {
},
},
rules: {
'react/prop-types': [0],
'no-unused-vars': 'off',
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'import/order': [
Expand All @@ -58,6 +60,11 @@ module.exports = {
},
},
],
'prettier/prettier': 'error',
'prettier/prettier': [
'error',
{
endOfLine: 'auto',
},
],
},
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/node_modules
/.pnp
.pnp.js
.eslintcache

# testing
/coverage
Expand All @@ -25,3 +26,4 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
rest.http

31 changes: 18 additions & 13 deletions craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,13 @@ const path = require('path')

const { whenDev, whenProd } = require('@craco/craco')
const CracoAlias = require('craco-alias')
const CracoEsbuildPlugin = require('craco-esbuild')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const ProgressBarPlugin = require('progress-bar-webpack-plugin')
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer')
const ManifestPlugin = require('webpack-manifest-plugin')

module.exports = {
babel: {
presets: [
[
'@babel/preset-env',
{
targets: {
chrome: '55',
},
},
],
],
},

webpack: {
configure: (webpackConfig, { paths }) => {
// multiple entry point config
Expand Down Expand Up @@ -93,10 +82,13 @@ module.exports = {
whenDev(() => {
webpackConfig.optimization.runtimeChunk = 'single'
webpackConfig.plugins.push(new BundleAnalyzerPlugin({ analyzerMode: 'server', openAnalyzer: false }))
webpackConfig.devtool = 'eval-cheap-module-source-map'
})

whenProd(() => {
webpackConfig.plugins.push(new BundleAnalyzerPlugin({ analyzerMode: 'static' }))
webpackConfig.plugins.push(new ProgressBarPlugin())
webpackConfig.devtool = false
})

return webpackConfig
Expand All @@ -111,5 +103,18 @@ module.exports = {
baseUrl: './src',
},
},
{
plugin: CracoEsbuildPlugin,
options: {
esbuildLoaderOptions: {
loader: 'jsx',
target: 'es2015',
},
esbuildMinimizerOptions: {
target: 'es2015',
css: true,
},
},
},
],
}
Loading

0 comments on commit 882884b

Please sign in to comment.