Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
fix: rollup build
Browse files Browse the repository at this point in the history
  • Loading branch information
zeromake committed Jul 24, 2017
1 parent 70a23c8 commit ac2cae3
Show file tree
Hide file tree
Showing 10 changed files with 2,524 additions and 8 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ typings/

# dotenv environment variables file
.env
/dist/
/test/test.js
/build/
/test/coverage/
Expand Down
16 changes: 12 additions & 4 deletions config/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import rollupTypescript from 'rollup-plugin-typescript'
// import uglify from 'rollup-plugin-uglify'
// import { minify } from 'uglify-es'
import uglify from 'rollup-plugin-uglify'
import { minify } from 'uglify-es'
import pkg from '../package.json'
// import typescript from 'typescript'

Expand All @@ -12,9 +12,17 @@ export default {
entry: 'src/zreact.ts',
moduleName: 'Zreact',
// dest: isProduction ? 'dist/zreact.min.js' : 'dist/zreact.js',
plugins: [rollupTypescriptPlugin],
plugins: !isProduction ? [rollupTypescriptPlugin] : [
rollupTypescriptPlugin,
uglify({}, minify)
],
sourceMap: !isProduction,
targets: [
targets: isProduction ? [
{
format: 'umd',
dest: pkg["minified:main"]
}
] : [
{
format: 'umd',
dest: pkg.main
Expand Down

0 comments on commit ac2cae3

Please sign in to comment.