Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/#427 ts-loader를 fork-ts-checker-webpack-plugin으로 대체한다 #428

Merged
merged 7 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions frontend/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@ module.exports = {
[
'@babel/preset-env',
{
targets: {
// TODO: 브라우저 지원 범위
chrome: '51',
},
targets: 'last 2 years, not dead',
useBuiltIns: 'entry',
corejs: '3.31.1',
},
],
['@babel/preset-react'],
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
['@babel/preset-typescript'],
],
};
106 changes: 1 addition & 105 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-storybook": "^0.6.12",
"fork-ts-checker-webpack-plugin": "^8.0.0",
"html-webpack-plugin": "^5.5.3",
"jest": "^29.6.1",
"jest-environment-jsdom": "^29.6.1",
Expand All @@ -65,7 +66,6 @@
"stylelint": "^15.10.2",
"stylelint-config-clean-order": "^5.0.1",
"ts-jest": "^29.1.1",
"ts-loader": "^9.4.4",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"webpack": "^5.88.1",
"webpack-cli": "^5.1.4",
Expand Down
12 changes: 12 additions & 0 deletions frontend/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');

module.exports = {
entry: './src/index.tsx',
Expand Down Expand Up @@ -41,6 +42,17 @@ module.exports = {
new CopyWebpackPlugin({
patterns: [{ from: './public/assets/og', to: './static/og' }],
}),
new ForkTsCheckerWebpackPlugin({
typescript: {
diagnosticOptions: {
syntactic: true,
},
},
issue: {
include: [{ file: '**/src/**/*.{ts,tsx}' }],
exclude: [{ file: '**/*.test.{ts,tsx}' }],
},
}),
],
resolve: {
extensions: ['.tsx', '.ts', '.jsx', '.js'],
Expand Down
1 change: 0 additions & 1 deletion frontend/webpack.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module.exports = merge(common, {
plugins: ['react-refresh/babel'],
},
},
'ts-loader',
],
},
],
Expand Down
2 changes: 1 addition & 1 deletion frontend/webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = merge(common, {
{
test: /\.tsx?$/,
exclude: /node_modules/,
use: ['babel-loader', 'ts-loader'],
use: ['babel-loader'],
},
],
},
Expand Down
Loading