Skip to content

Commit 5d2cc8c

Browse files
committed
Updated rollup config
1 parent 129eefc commit 5d2cc8c

File tree

3 files changed

+114
-1
lines changed

3 files changed

+114
-1
lines changed

package-lock.json

+104
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"name": "cement",
33
"version": "1.0.0",
44
"description": "A logic based reactive JavaScript library that binds your application together.",
5-
"main": "/dist",
5+
"main": "./dist/index.js",
6+
"types": "./dist/index.d.ts",
67
"scripts": {
78
"build": "rollup -c rollup.config.js",
89
"watch": "rollup -wc rollup.config.js"
@@ -21,6 +22,8 @@
2122
"devDependencies": {
2223
"@babel/core": "^7.8.4",
2324
"@babel/preset-env": "^7.8.4",
25+
"@rollup/plugin-commonjs": "^11.0.2",
26+
"@rollup/plugin-node-resolve": "^7.1.1",
2427
"@types/lodash.get": "^4.4.6",
2528
"@types/lodash.set": "^4.3.6",
2629
"rollup": "^1.31.0",

rollup.config.js

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
const babel = require('rollup-plugin-babel');
22
const ts = require('rollup-plugin-typescript2');
3+
const resolve = require('@rollup/plugin-node-resolve');
4+
const commonjs = require('@rollup/plugin-commonjs');
35

46
module.exports = {
57
input: './lib/index.ts',
@@ -8,6 +10,10 @@ module.exports = {
810
format: 'cjs'
911
},
1012
plugins: [
13+
commonjs(),
14+
resolve({
15+
browser: true
16+
}),
1117
babel(),
1218
ts()
1319
]

0 commit comments

Comments
 (0)