Skip to content

Commit

Permalink
Transpile esm build.
Browse files Browse the repository at this point in the history
  • Loading branch information
robdodson committed Sep 18, 2019
1 parent b218f56 commit 4003feb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "2.2.0",
"description": "A polyfill for the proposed inert API",
"main": "dist/inert.js",
"module": "src/inert.js",
"module": "dist/inert.esm.js",
"scripts": {
"build": "rollup -c",
"prepublishOnly": "SAUCE=true npm run test",
Expand Down
18 changes: 15 additions & 3 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,26 @@ import {uglify} from 'rollup-plugin-uglify';
import babel from 'rollup-plugin-babel';

export default [
{
input: 'src/inert.js',
output: {
file: 'dist/inert.esm.js',
format: 'esm',
},
plugins: [
babel({
exclude: 'node_modules/**',
}),
],
},
{
input: 'src/inert.js',
output: {
file: 'dist/inert.js',
format: 'umd',
amd: {
id: 'inert'
}
id: 'inert',
},
},
plugins: [
babel({
Expand All @@ -23,7 +35,7 @@ export default [
file: 'dist/inert.min.js',
format: 'umd',
amd: {
id: 'inert'
id: 'inert',
},
sourcemap: true,
},
Expand Down

0 comments on commit 4003feb

Please sign in to comment.