Skip to content

Commit

Permalink
chore(package): update bundle
Browse files Browse the repository at this point in the history
- add sourcemap
- main file change from './build/index.cjs.js' to './index.js'
  • Loading branch information
dispix committed Oct 29, 2018
1 parent 70c45a0 commit 1f00e4e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Build
build/
index.js
index.js.map

# Logs
logs
Expand Down
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "react-pirate",
"version": "1.1.2",
"description": "Sets of useful hooks for react 16.7 and above",
"main": "./build/index.cjs.js",
"main": "index.js",
"scripts": {
"test": "test",
"prepublish": "rollup -c"
"prepublish": "rollup -c -m"
},
"repository": {
"type": "git",
Expand All @@ -22,7 +22,9 @@
},
"homepage": "https://github.com/dispix/react-pirate#readme",
"files": [
"build",
"index.d.ts",
"index.js",
"index.js.map",
"package.json",
"README.md"
],
Expand All @@ -34,4 +36,4 @@
"rollup-plugin-commonjs": "^9.2.0",
"rollup-plugin-node-resolve": "^3.4.0"
}
}
}
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import commonjs from 'rollup-plugin-commonjs'
import resolve from 'rollup-plugin-node-resolve'

import packagejson from './package.json'

export default {
input: 'src/index.js',
output: {
file: 'build/index.cjs.js',
file: packagejson.main,
format: 'cjs',
},
plugins: [resolve(), commonjs()],
Expand Down

0 comments on commit 1f00e4e

Please sign in to comment.