Skip to content

Commit

Permalink
chore: tweak build settings
Browse files Browse the repository at this point in the history
  • Loading branch information
lukePeavey committed Nov 14, 2020
1 parent 2760d8a commit 6c8f0d5
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
"name": "split-type",
"version": "0.2.1",
"description": "A javascript library that splits plain text into individual lines, words, and characters.",
"main": "dist/split-type.js",
"unpkg": "dist/split-type.min.js",
"main": "dist/index.js",
"unpkg": "umd/index.min.js",
"files": [
"umd/*.{js,ts}",
"dist/*.{js,ts}",
"lib/**/*.{js,ts}"
],
Expand Down
22 changes: 16 additions & 6 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,34 @@ https://github.com/lukePeavey/SplitType
@author Luke Peavey <lwpeavey@gmail.com>`

export default [
// UMD bundle
// Minified UMD bundle
{
input: 'lib/index.js',
output: {
file: 'dist/split-type.js',
file: 'umd/index.min.js',
format: 'umd',
name: 'SplitType',
},
plugins: [babel({ babelHelpers: 'bundled' }), banner(fileHeader)],
plugins: [babel({ babelHelpers: 'bundled' }), terser(), banner(fileHeader)],
},
// Minified UMD bundle
// UMD bundle
{
input: 'lib/index.js',
output: {
file: 'dist/split-type.min.js',
file: 'umd/index.js',
format: 'umd',
name: 'SplitType',
},
plugins: [babel({ babelHelpers: 'bundled' }), terser(), banner(fileHeader)],
plugins: [babel({ babelHelpers: 'bundled' }), banner(fileHeader)],
},
// ESM Module
{
input: 'lib/SplitType.js',
output: {
file: 'dist/index.js',
format: 'esm',
name: 'SplitType',
},
plugins: [babel({ babelHelpers: 'bundled' }), banner(fileHeader)],
},
]

0 comments on commit 6c8f0d5

Please sign in to comment.