diff --git a/package.json b/package.json index 27f0776..8adf62c 100644 --- a/package.json +++ b/package.json @@ -75,11 +75,12 @@ "babel-loader": "8.1.0" }, "files": [ - "dist/bluelib-react.js" + "dist/**/*" ], "main": "dist/bluelib-react.js", + "types": "dist/index.d.ts", "scripts": { - "package:build": "webpack", + "package:build": "rollup -c", "storybook:start": "start-storybook -p 30060 -s public", "storybook:build": "build-storybook -s public", "storybook:deploy": "storybook-to-ghpages" diff --git a/rollup.config.js b/rollup.config.js index 9c0ec61..66f5c11 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -25,7 +25,9 @@ export default { postcss({ modules: true, }), - typescript(), + typescript({ + tsconfig: "./tsconfig.json", + }), babel({ babelHelpers: "runtime", presets: ["@babel/preset-env", "@babel/preset-react"], diff --git a/tsconfig.json b/tsconfig.json index c482d94..e70263e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,9 +19,15 @@ "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", - "sourceMap": true + "sourceMap": true, + "outDir": "dist", + "declaration": true, + "declarationDir": "." }, "include": [ "src" + ], + "exclude": [ + "dist" ] }