Skip to content

Commit

Permalink
build: fix rollup bundle issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nzbin committed Sep 17, 2020
1 parent d263d22 commit 7ac50bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
[
"@babel/preset-env",
{
"modules": false,
"loose": true
"modules": false
}
]
],
Expand Down
2 changes: 1 addition & 1 deletion .browserslistrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
last 2 versions
Firefox ESR
not dead
not IE 9-11
not ie <= 8
15 changes: 8 additions & 7 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import babel from 'rollup-plugin-babel';
import resolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import babel from '@rollup/plugin-babel';
import pkg from './package.json';

const banner = String.raw`/*!
* ____ __ ______ __________ _ _____________ ____________
* ____ __ ______ __________ _ _____________ ____________
* / __ \/ / / / __ \/_ __/ __ \ | / / _/ ____/ | / / ____/ __ \
* / /_/ / /_/ / / / / / / / / / / | / // // __/ | | /| / / __/ / /_/ /
* / ____/ __ / /_/ / / / / /_/ /| |/ // // /___ | |/ |/ / /___/ _, _/
* /_/ /_/ /_/\____/ /_/ \____/ |___/___/_____/ |__/|__/_____/_/ |_|
* /_/ /_/ /_/\____/ /_/ \____/ |___/___/_____/ |__/|__/_____/_/ |_|
*
* ${pkg.name} - v${pkg.version}
* ${pkg.description}
Expand All @@ -21,7 +21,7 @@ const banner = String.raw`/*!

export default [
{
input: 'src/js/core.js',
input: 'src/js/index.js',
output: [
{
name: 'photoviewer',
Expand All @@ -32,7 +32,8 @@ export default [
{
file: 'dist/photoviewer.common.js',
banner,
format: 'cjs'
format: 'cjs',
exports: 'auto',
},
{
file: 'dist/photoviewer.esm.js',
Expand Down

0 comments on commit 7ac50bc

Please sign in to comment.