Skip to content

Commit

Permalink
chore: 번들사이즈 분석을 위한 dnd academy web에 codecov plugin 세팅 (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
saseungmin authored Oct 15, 2024
1 parent 36d4fd5 commit 64f9115
Show file tree
Hide file tree
Showing 46 changed files with 282 additions and 20 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
6 changes: 5 additions & 1 deletion apps/web/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,9 @@ module.exports = {
rules: {},
},
],
rules: {},
rules: {
'import/no-extraneous-dependencies': ['error', {
devDependencies: ['**/*.test.ts', '**/*.test.tsx', '**/*.stories.tsx', '**/*.stories.ts', 'next.config.js'],
}],
},
};
12 changes: 11 additions & 1 deletion apps/web/next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const { codecovNextJSWebpackPlugin } = require('@codecov/nextjs-webpack-plugin');
const path = require('path');

const isProd = process.env.NODE_ENV === 'production';
Expand Down Expand Up @@ -40,7 +41,7 @@ const nextConfig = {
experimental: {
typedRoutes: true,
},
webpack(config) {
webpack(config, options) {
const fileLoaderRule = config.module.rules.find((rule) => rule.test?.test?.('.svg'));

// eslint-disable-next-line no-param-reassign
Expand All @@ -62,6 +63,15 @@ const nextConfig = {

fileLoaderRule.exclude = /\.svg$/i;

config.plugins.push(
codecovNextJSWebpackPlugin({
enableBundleAnalysis: true,
bundleName: '@dnd-academy/web',
uploadToken: process.env.CODECOV_TOKEN,
webpack: options.webpack,
}),
);

return config;
},

Expand Down
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
},
"devDependencies": {
"@chromatic-com/storybook": "2.0.2",
"@codecov/nextjs-webpack-plugin": "1.2.0",
"@dnd-academy/eslint-config": "*",
"@next/eslint-plugin-next": "14.2.12",
"@storybook/addon-essentials": "8.3.3",
Expand Down
Loading

0 comments on commit 64f9115

Please sign in to comment.