Skip to content

Commit

Permalink
fix: remove es and cjs polyfill builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan DiMascio committed Jul 28, 2020
1 parent 75347ff commit 38280ab
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
25 changes: 4 additions & 21 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ const libWeb = {
input: [path.resolve(__dirname, 'src/index.js')]
};

const polyfillUmd = {
const polyfill = {
...baseConfig,
input: [path.resolve(__dirname, 'src/polyfill/index.js')],
input: [path.resolve(__dirname, 'src/polyfill.js')],
output: {
...baseUmd.output,
file: 'dist/polyfill/index.min.js'
file: 'dist/polyfill.min.js'
},
plugins: [
nodeResolve(),
Expand All @@ -86,21 +86,4 @@ const polyfillUmd = {
]
};

const polyfillWeb = {
...baseConfig,
input: [path.resolve(__dirname, 'src/polyfill/index.js')],
output: [
{
...baseConfig.output,
file: 'dist/polyfill/index.js',
format: 'cjs'
},
{
...baseConfig.output,
file: 'dist/polyfill/index.m.js',
format: 'es'
}
]
};

export default [libUmd, libWeb, polyfillUmd, polyfillWeb];
export default [libUmd, libWeb, polyfill];
2 changes: 1 addition & 1 deletion src/polyfill/index.js → src/polyfill.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import 'core-js/features/set';
import 'core-js/features/array/flat';
import 'core-js/features/array/from';

import toClass from '..';
import toClass from '.';

export default toClass;

0 comments on commit 38280ab

Please sign in to comment.