diff --git a/rollup.config.js b/rollup.config.js index 2a84747..779a2e3 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -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(), @@ -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]; diff --git a/src/polyfill/index.js b/src/polyfill.js similarity index 87% rename from src/polyfill/index.js rename to src/polyfill.js index 5fab457..e742195 100644 --- a/src/polyfill/index.js +++ b/src/polyfill.js @@ -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;