mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 11:34:21 +00:00
📦 Configure typescript to output declarations
This commit is contained in:
parent
db5e362664
commit
54dcb31c4e
3 changed files with 13 additions and 4 deletions
|
@ -75,11 +75,12 @@
|
||||||
"babel-loader": "8.1.0"
|
"babel-loader": "8.1.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"dist/bluelib-react.js"
|
"dist/**/*"
|
||||||
],
|
],
|
||||||
"main": "dist/bluelib-react.js",
|
"main": "dist/bluelib-react.js",
|
||||||
|
"types": "dist/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"package:build": "webpack",
|
"package:build": "rollup -c",
|
||||||
"storybook:start": "start-storybook -p 30060 -s public",
|
"storybook:start": "start-storybook -p 30060 -s public",
|
||||||
"storybook:build": "build-storybook -s public",
|
"storybook:build": "build-storybook -s public",
|
||||||
"storybook:deploy": "storybook-to-ghpages"
|
"storybook:deploy": "storybook-to-ghpages"
|
||||||
|
|
|
@ -25,7 +25,9 @@ export default {
|
||||||
postcss({
|
postcss({
|
||||||
modules: true,
|
modules: true,
|
||||||
}),
|
}),
|
||||||
typescript(),
|
typescript({
|
||||||
|
tsconfig: "./tsconfig.json",
|
||||||
|
}),
|
||||||
babel({
|
babel({
|
||||||
babelHelpers: "runtime",
|
babelHelpers: "runtime",
|
||||||
presets: ["@babel/preset-env", "@babel/preset-react"],
|
presets: ["@babel/preset-env", "@babel/preset-react"],
|
||||||
|
|
|
@ -19,9 +19,15 @@
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noEmit": true,
|
"noEmit": true,
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"sourceMap": true
|
"sourceMap": true,
|
||||||
|
"outDir": "dist",
|
||||||
|
"declaration": true,
|
||||||
|
"declarationDir": "."
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src"
|
"src"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"dist"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue