Skip to content

Commit

Permalink
[FE] CopyWebpackPlugin을 사용하여 favicon 적용 문제 해결 (#349)
Browse files Browse the repository at this point in the history
* chore: copy-webpack-plugin 추가

* chore: favicon 파일들을 빌드 디렉토리로 복사
  • Loading branch information
Yoonkyoungme authored Sep 20, 2024
1 parent 138e397 commit 0b3d564
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 2 deletions.
70 changes: 69 additions & 1 deletion frontend/package-lock.json

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

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"@typescript-eslint/eslint-plugin": "7.16.0",
"@typescript-eslint/parser": "7.16.0",
"babel-loader": "9.1.3",
"copy-webpack-plugin": "^12.0.2",
"dotenv-webpack": "8.1.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-jsx-a11y": "6.9.0",
Expand Down
7 changes: 6 additions & 1 deletion frontend/webpack.common.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
const path = require('path');
const webpack = require('webpack');

const HtmlWebpackPlugin = require('html-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
const DotenvWebpackPlugin = require('dotenv-webpack');

const { sentryWebpackPlugin } = require('@sentry/webpack-plugin');
const webpack = require('webpack');

module.exports = () => ({
entry: './src/index.tsx',
Expand Down Expand Up @@ -69,6 +71,9 @@ module.exports = () => ({
new HtmlWebpackPlugin({
template: 'public/index.html',
}),
new CopyWebpackPlugin({
patterns: [{ from: 'public/assets/favicons', to: 'assets/favicons' }],
}),
new ForkTsCheckerWebpackPlugin(),
new DotenvWebpackPlugin(),
sentryWebpackPlugin({
Expand Down

0 comments on commit 0b3d564

Please sign in to comment.