Skip to content

Commit

Permalink
chore: rollup 빌드 설정 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ssi02014 committed Dec 2, 2024
1 parent 7aa51ec commit e0e4cfe
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 101 deletions.
76 changes: 28 additions & 48 deletions .pnp.cjs

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

Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/smob-npm-1.4.0-2bf978343e-b74e1fb724.zip
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@modern-kit/utils": "workspace:*",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^12.1.0",
"@testing-library/dom": "^10.0.0",
"@testing-library/jest-dom": "^6.5.0",
Expand All @@ -40,6 +39,7 @@
"@types/react-dom": "^18.2.7",
"@types/ua-parser-js": "^0.7.39",
"@vitest/coverage-istanbul": "^2.1.3",
"autoprefixer": "^10.4.20",
"esbuild": "^0.24.0",
"jsdom": "^25.0.0",
"postcss": "^8.4.41",
Expand Down
12 changes: 7 additions & 5 deletions packages/react/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import nodeResolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import commonjs from '@rollup/plugin-commonjs';
import peerDepsExternal from 'rollup-plugin-peer-deps-external';
import pkg from './package.json' assert { type: 'json' };
import esbuild from 'rollup-plugin-esbuild';
import postcss from 'rollup-plugin-postcss';
import autoprefixer from 'autoprefixer';

const extensions = ['.js', '.jsx', '.ts', '.tsx'];

Expand All @@ -24,7 +24,10 @@ export default {
format: 'esm',
},
],
external: ['react', 'react-dom'],
external: [
...Object.keys(pkg.dependencies),
...Object.keys(pkg.peerDependencies),
],
plugins: [
peerDepsExternal(),
nodeResolve({
Expand All @@ -34,12 +37,11 @@ export default {
exclude: ['**/*.spec.tsx', '**/*.spec.ts'],
}),
commonjs(),
esbuild(),
esbuild({ minify: true }),
postcss({
extract: false,
modules: true,
minimize: true,
plugins: [autoprefixer()],
}),
terser(),
],
};
3 changes: 1 addition & 2 deletions packages/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@
"@modern-kit/types": "workspace:*",
"@rollup/plugin-commonjs": "^28.0.0",
"@rollup/plugin-node-resolve": "^15.1.0",
"@rollup/plugin-terser": "^0.4.3",
"@rollup/plugin-typescript": "^12.1.0",
"@types/lodash-es": "^4",
"@types/lodash-es": "^4.17.12",
"@vitest/coverage-istanbul": "^2.1.3",
"esbuild": "^0.24.0",
"jsdom": "^25.0.0",
Expand Down
4 changes: 1 addition & 3 deletions packages/utils/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import nodeResolve from '@rollup/plugin-node-resolve';
import terser from '@rollup/plugin-terser';
import typescript from '@rollup/plugin-typescript';
import commonjs from '@rollup/plugin-commonjs';
import pkg from './package.json' assert { type: 'json' };
Expand All @@ -26,8 +25,7 @@ export default {
extensions,
}),
commonjs(),
esbuild(),
esbuild({ minify: true }),
typescript({ tsconfig: './tsconfig.json', exclude: ['**/*.spec.ts'] }),
terser(),
],
};
64 changes: 22 additions & 42 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4959,7 +4959,6 @@ __metadata:
"@modern-kit/utils": "workspace:*"
"@rollup/plugin-commonjs": "npm:^28.0.0"
"@rollup/plugin-node-resolve": "npm:^15.1.0"
"@rollup/plugin-terser": "npm:^0.4.3"
"@rollup/plugin-typescript": "npm:^12.1.0"
"@testing-library/dom": "npm:^10.0.0"
"@testing-library/jest-dom": "npm:^6.5.0"
Expand All @@ -4970,6 +4969,7 @@ __metadata:
"@types/react-dom": "npm:^18.2.7"
"@types/ua-parser-js": "npm:^0.7.39"
"@vitest/coverage-istanbul": "npm:^2.1.3"
autoprefixer: "npm:^10.4.20"
classnames: "npm:^2.5.1"
esbuild: "npm:^0.24.0"
jsdom: "npm:^25.0.0"
Expand Down Expand Up @@ -5009,9 +5009,8 @@ __metadata:
"@modern-kit/types": "workspace:*"
"@rollup/plugin-commonjs": "npm:^28.0.0"
"@rollup/plugin-node-resolve": "npm:^15.1.0"
"@rollup/plugin-terser": "npm:^0.4.3"
"@rollup/plugin-typescript": "npm:^12.1.0"
"@types/lodash-es": "npm:^4"
"@types/lodash-es": "npm:^4.17.12"
"@vitest/coverage-istanbul": "npm:^2.1.3"
esbuild: "npm:^0.24.0"
jsdom: "npm:^25.0.0"
Expand Down Expand Up @@ -5483,22 +5482,6 @@ __metadata:
languageName: node
linkType: hard

"@rollup/plugin-terser@npm:^0.4.3":
version: 0.4.4
resolution: "@rollup/plugin-terser@npm:0.4.4"
dependencies:
serialize-javascript: "npm:^6.0.1"
smob: "npm:^1.0.0"
terser: "npm:^5.17.4"
peerDependencies:
rollup: ^2.0.0||^3.0.0||^4.0.0
peerDependenciesMeta:
rollup:
optional: true
checksum: b9cb6c8f02ac1c1344019e9fb854321b74f880efebc41b6bdd84f18331fce0f4a2aadcdb481042245cd3f409b429ac363af71f9efec4a2024731d67d32af36ee
languageName: node
linkType: hard

"@rollup/plugin-typescript@npm:^12.1.0":
version: 12.1.0
resolution: "@rollup/plugin-typescript@npm:12.1.0"
Expand Down Expand Up @@ -6355,7 +6338,7 @@ __metadata:
languageName: node
linkType: hard

"@types/lodash-es@npm:^4, @types/lodash-es@npm:^4.17.12":
"@types/lodash-es@npm:^4.17.12":
version: 4.17.12
resolution: "@types/lodash-es@npm:4.17.12"
dependencies:
Expand Down Expand Up @@ -7829,6 +7812,24 @@ __metadata:
languageName: node
linkType: hard

"autoprefixer@npm:^10.4.20":
version: 10.4.20
resolution: "autoprefixer@npm:10.4.20"
dependencies:
browserslist: "npm:^4.23.3"
caniuse-lite: "npm:^1.0.30001646"
fraction.js: "npm:^4.3.7"
normalize-range: "npm:^0.1.2"
picocolors: "npm:^1.0.1"
postcss-value-parser: "npm:^4.2.0"
peerDependencies:
postcss: ^8.1.0
bin:
autoprefixer: bin/autoprefixer
checksum: e1f00978a26e7c5b54ab12036d8c13833fad7222828fc90914771b1263f51b28c7ddb5803049de4e77696cbd02bb25cfc3634e80533025bb26c26aacdf938940
languageName: node
linkType: hard

"available-typed-arrays@npm:^1.0.7":
version: 1.0.7
resolution: "available-typed-arrays@npm:1.0.7"
Expand Down Expand Up @@ -8152,7 +8153,7 @@ __metadata:
languageName: node
linkType: hard

"browserslist@npm:^4.24.0, browserslist@npm:^4.24.2":
"browserslist@npm:^4.23.3, browserslist@npm:^4.24.0, browserslist@npm:^4.24.2":
version: 4.24.2
resolution: "browserslist@npm:4.24.2"
dependencies:
Expand Down Expand Up @@ -20514,13 +20515,6 @@ __metadata:
languageName: node
linkType: hard

"smob@npm:^1.0.0":
version: 1.4.0
resolution: "smob@npm:1.4.0"
checksum: b74e1fb7246b4c6c366045d36e25de698d8d3987ac016f49abce504533925c4202b4127104f343c9b1e6124a84c24eefe8f368f3590156cdfc7f40440e55205e
languageName: node
linkType: hard

"snake-case@npm:^3.0.4":
version: 3.0.4
resolution: "snake-case@npm:3.0.4"
Expand Down Expand Up @@ -21296,20 +21290,6 @@ __metadata:
languageName: node
linkType: hard

"terser@npm:^5.17.4":
version: 5.19.2
resolution: "terser@npm:5.19.2"
dependencies:
"@jridgewell/source-map": "npm:^0.3.3"
acorn: "npm:^8.8.2"
commander: "npm:^2.20.0"
source-map-support: "npm:~0.5.20"
bin:
terser: bin/terser
checksum: 95817b86619af33d8d143d7ae02dfcd9ac2cf4ea5b5cb7b208aaccff4cdc5594893960a4c3dcdac09863ebd43e2835ab173997041790aa77092c1d31ff40c95a
languageName: node
linkType: hard

"terser@npm:^5.26.0":
version: 5.36.0
resolution: "terser@npm:5.36.0"
Expand Down

0 comments on commit e0e4cfe

Please sign in to comment.