Skip to content

Commit

Permalink
feat: add minified builds to project distribution
Browse files Browse the repository at this point in the history
This release includes minified versions (.min) of the output files in the project distribution.
  • Loading branch information
AllanOricil committed Jan 28, 2024
1 parent 97c4253 commit 08b4733
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"release": "semantic-release"
},
"devDependencies": {
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/commit-analyzer": "^11.1.0",
Expand Down
69 changes: 69 additions & 0 deletions pnpm-lock.yaml

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

22 changes: 22 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import typescript from "@rollup/plugin-typescript";
import terser from "@rollup/plugin-terser";

export default {
input: "./src/index.ts",
Expand All @@ -20,6 +21,27 @@ export default {
globals: {},
sourcemap: true,
},
,
{
file: "./dist/index.min.mjs",
format: "es",
sourcemap: true,
plugins: [terser()],
},
{
file: "./dist/index.min.cjs",
format: "cjs",
sourcemap: true,
plugins: [terser()],
},
{
file: "./dist/index.min.umd.js",
format: "umd",
name: "jsTemplate",
globals: {},
sourcemap: true,
plugins: [terser()],
},
],
plugins: [
typescript({
Expand Down

0 comments on commit 08b4733

Please sign in to comment.