Skip to content

Commit

Permalink
fix: fix require auto problem
Browse files Browse the repository at this point in the history
  • Loading branch information
calimanco committed Jan 20, 2021
1 parent 74389b7 commit bef21c5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
4 changes: 2 additions & 2 deletions auto.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
'use strict'
// eslint-disable-next-line @typescript-eslint/no-var-requires
module.exports = require('./dist/promise-polyfill-plus.umd').autoPolyfill()

require('./dist/promise-polyfill-plus.umd.auto.js')
8 changes: 4 additions & 4 deletions release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ module.exports = {
{
assets: [
{
path: 'dist/promise-polyfill-plus.umd.js',
label: 'JS umd'
path: 'dist/promise-polyfill-plus.umd.auto.js',
label: 'umd.auto.js'
},
{
path: 'dist/promise-polyfill-plus.umd.min.js',
label: 'JS umd min'
path: 'dist/promise-polyfill-plus.umd.auto.min.js',
label: 'umd.auto.min.js'
}
]
}
Expand Down
14 changes: 12 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,24 @@ export default {
file: pkg.main,
name: camelCase(libraryName),
format: 'umd',
sourcemap: true
sourcemap: true,
exports: 'named'
},
{
file: pkg.main.replace('.js', '.min.js'),
file: pkg.main.replace('.js', '.auto.js'),
name: camelCase(libraryName),
format: 'umd',
sourcemap: true,
outro: 'autoPolyfill()',
exports: 'named'
},
{
file: pkg.main.replace('.js', '.auto.min.js'),
name: camelCase(libraryName),
format: 'umd',
sourcemap: false,
outro: 'autoPolyfill()',
exports: 'named',
plugins: [uglify()]
},
{ file: pkg.module, format: 'es', sourcemap: true }
Expand Down

0 comments on commit bef21c5

Please sign in to comment.