Skip to content

Commit

Permalink
feat: add minified builds to project distribution (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOricil authored Jan 28, 2024
2 parents 97c4253 + 08b4733 commit be4dee7
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 be4dee7

Please sign in to comment.