Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Configure Babel: presets, plugins, env-specific builds, polyfills, and performance. Use when maintaining Babel-based toolchains or writing custom transforms.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
A practical guide to Babel: presets and plugins, environment-specific configuration, polyfill strategy, and performance — for the many codebases where Babel is still the transform layer, and for anyone writing custom Babel plugins.
Babel transforms JavaScript via a plugin pipeline: parse → transform (plugins) → generate. Presets are plugin bundles (@babel/preset-env, @babel/preset-react, @babel/preset-typescript). Babel's strength is its unmatched plugin ecosystem and precise targeting; its weakness is speed (JS-based, single-threaded per file). Modern guidance: keep Babel where its plugins earn their keep, use faster tools elsewhere.
preset-env + core-js polyfills.babel.config.js (root, monorepo-wide) vs .babelrc (per-package, file-relative). Root config is the modern default; .babelrc doesn't apply to files outside its package.preset-env. Compiles based on targets (browserslist): only transforms what targets lack. bugfixes: true for smaller output; shippedProposals for stable proposals.core-js via useBuiltIns: 'usage' (inject per-file, needs corejs version set) or 'entry' (whole bundle). usage + pinned core-js version = smallest correct output.@babel/plugin-proposal-decorators version: '2023-11' vs legacy — pick deliberately.env option. Different config per BABEL_ENV/NODE_ENV (test vs development vs production): e.g., istanbul only in test, minification-related plugins only in production.babel-loader cacheDirectory: true; Jest caches transforms. First build is slow; warm cache should be fast — if not, investigate.path.replaceWith, path.remove); @babel/types builders; always write tests with @babel/core transform snapshots.1. Baseline config.
// babel.config.js
module.exports = api => {
api.cache.using(() => process.env.NODE_ENV);
const isTest = api.env('test');
return {
presets: [
['@babel/preset-env', { targets: isTest ? { node: 'current' } : '> 0.5%, not dead', bugfixes: true,
useBuiltIns: 'usage', corejs: { version: '3.36', proposals: false } }],
['@babel/preset-react', { runtime: 'automatic' }],
'@babel/preset-typescript',
],
plugins: [
['@babel/plugin-proposal-decorators', { version: '2023-11' }],
],
};
};
2. Browserslist. Define targets once (.browserslistrc or package.json) — preset-env, Autoprefixer, and eslint all read it. One source of truth.
3. Test transform. npx babel src/index.ts --out-file /tmp/out.js and inspect: are helpers duplicated per file? (@babel/plugin-transform-runtime dedupes helpers via @babel/runtime — use it for libraries.)
4. Library authors. Use @babel/plugin-transform-runtime (no global polyfill pollution) instead of useBuiltIns: 'usage' (which pollutes globals — fine for apps, bad for libraries).
5. Custom plugin (when needed).
module.exports = () => ({
visitor: {
Identifier(path) {
if (path.node.name === 'DEBUG' && !process.env.DEBUG) path.replaceWith(t.booleanLiteral(false));
},
},
});
Keep plugins small, pure, and tested — AST transforms are a maintenance liability.
corejs: 3 floating vs locked 3.36 — floating changes polyfill behavior between installs. Pin it.useBuiltIns: 'usage' in a published library pollutes consumers' globals. Libraries use transform-runtime; apps use usage/entry..babelrc vs babel.config.js confusion. .babelrc lookup stops at package boundaries — monorepo files outside the package silently get no config. Prefer root babel.config.js.api.env('test') branches that change semantics (not just speed) cause "tests pass, prod breaks". Keep env branches to instrumentation/caching.아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.