Skip to content

Commit

Permalink
Merge pull request #1477 from glimmerjs/run-production-build-through-…
Browse files Browse the repository at this point in the history
…terser

Use terser for the production bundle
  • Loading branch information
NullVoxPopuli authored Oct 31, 2023
2 parents 81eb8d0 + a66850e commit 7b7e97c
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 60 deletions.
2 changes: 1 addition & 1 deletion benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"@glimmer/compiler": "workspace:^",
"@rollup/plugin-strip": "^3.0.2",
"@rollup/plugin-terser": "^0.4.1",
"@rollup/plugin-terser": "^0.4.4",
"@types/express": "^4.17.17",
"@types/fs-extra": "^11.0.1",
"@types/symlink-or-copy": "^1.2.0",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"@glimmer/env": "0.1.7",
"@release-it-plugins/lerna-changelog": "^6.0.0",
"@release-it-plugins/workspaces": "^4.0.0",
"@rollup/plugin-terser": "^0.4.1",
"@rollup/plugin-terser": "^0.4.4",
"@types/babel-plugin-macros": "^3.1.0",
"@types/babel__core": "^7.20.0",
"@types/babel__traverse": "^7.18.5",
Expand Down
2 changes: 2 additions & 0 deletions packages/@glimmer-workspace/build/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import replace from '@rollup/plugin-replace';
import * as insert from 'rollup-plugin-insert';
import importMeta from './import-meta.js';
import inline from './inline.js';
import terser from '@rollup/plugin-terser';

// eslint-disable-next-line import/no-named-as-default-member
const { ModuleKind, ModuleResolutionKind, ScriptTarget, ImportsNotUsedAsValues } = ts;
Expand Down Expand Up @@ -289,6 +290,7 @@ export class Package {
commonjs(),
nodeResolve(),
...this.replacements(env),
...(env === 'prod' ? [terser()] : []),
postcss(),
typescript(this.#package, {
target: ScriptTarget.ES2022,
Expand Down
3 changes: 2 additions & 1 deletion packages/@glimmer-workspace/build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"@rollup/plugin-commonjs": "^24.1.0",
"@rollup/plugin-node-resolve": "^15.0.2",
"@rollup/plugin-replace": "^5.0.4",
"@rollup/plugin-terser": "^0.4.4",
"eslint": "^8.52.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-json": "^3.1.0",
Expand All @@ -40,8 +41,8 @@
"vite": "4.3.9"
},
"devDependencies": {
"eslint": "^8.52.0",
"@types/node": "^18.16.6",
"eslint": "^8.52.0",
"typescript": "*"
}
}
Loading

0 comments on commit 7b7e97c

Please sign in to comment.