mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 19:44:21 +00:00
🔨 Configure rollup
This commit is contained in:
parent
0f60790bd2
commit
a132109836
3 changed files with 70 additions and 7 deletions
14
package.json
14
package.json
|
@ -25,6 +25,7 @@
|
|||
},
|
||||
"license": "AGPL-3.0-or-later",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"classnames": "^2.3.1",
|
||||
"color": "https://github.com/Steffo99/color",
|
||||
"uuid": "^8.3.2"
|
||||
|
@ -34,15 +35,15 @@
|
|||
"react-dom": "^17.0.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"rollup": "^2.56.3",
|
||||
"rollup-plugin-postcss": "^4.0.1",
|
||||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"@rollup/plugin-commonjs": "^20.0.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.4",
|
||||
"@babel/core": "^7.15.0",
|
||||
"@babel/plugin-transform-runtime": "^7.15.0",
|
||||
"@babel/preset-env": "^7.15.0",
|
||||
"@babel/preset-react": "^7.14.5",
|
||||
"@babel/preset-typescript": "^7.15.0",
|
||||
"@rollup/plugin-babel": "^5.3.0",
|
||||
"@rollup/plugin-commonjs": "^20.0.0",
|
||||
"@rollup/plugin-node-resolve": "^13.0.4",
|
||||
"@rollup/plugin-typescript": "^8.2.5",
|
||||
"@storybook/addon-actions": "^6.3.7",
|
||||
"@storybook/addon-docs": "^6.3.7",
|
||||
"@storybook/addon-essentials": "^6.3.7",
|
||||
|
@ -62,9 +63,12 @@
|
|||
"@types/react": "^17.0.0",
|
||||
"@types/react-dom": "^17.0.0",
|
||||
"@types/uuid": "^8.3.1",
|
||||
"postcss": "^8.3.6",
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-scripts": "4.0.3",
|
||||
"rollup": "^2.56.3",
|
||||
"rollup-plugin-postcss": "^4.0.1",
|
||||
"typescript": "^4.1.2"
|
||||
},
|
||||
"resolutions": {
|
||||
|
|
39
rollup.config.js
Normal file
39
rollup.config.js
Normal file
|
@ -0,0 +1,39 @@
|
|||
import babel from '@rollup/plugin-babel'
|
||||
import commonjs from '@rollup/plugin-commonjs'
|
||||
import resolve from '@rollup/plugin-node-resolve'
|
||||
import postcss from 'rollup-plugin-postcss'
|
||||
import typescript from "@rollup/plugin-typescript"
|
||||
import pkg from './package.json'
|
||||
|
||||
|
||||
export default {
|
||||
input: 'src/index.ts',
|
||||
output: {
|
||||
file: pkg.main,
|
||||
format: 'cjs',
|
||||
exports: 'named'
|
||||
},
|
||||
external: [
|
||||
"@babel/runtime",
|
||||
"react",
|
||||
"react-dom",
|
||||
"classnames",
|
||||
"color",
|
||||
"uuid",
|
||||
],
|
||||
plugins: [
|
||||
postcss({
|
||||
modules: true,
|
||||
}),
|
||||
typescript(),
|
||||
babel({
|
||||
babelHelpers: "runtime",
|
||||
presets: ["@babel/preset-env", "@babel/preset-react"],
|
||||
plugins: ["@babel/plugin-transform-runtime"],
|
||||
extensions: [".tsx", ".ts", ".jsx", ".js", ".mjs"],
|
||||
exclude: 'node_modules/**',
|
||||
}),
|
||||
resolve(),
|
||||
commonjs(),
|
||||
]
|
||||
}
|
24
yarn.lock
24
yarn.lock
|
@ -976,6 +976,18 @@
|
|||
resolve "^1.8.1"
|
||||
semver "^5.5.1"
|
||||
|
||||
"@babel/plugin-transform-runtime@^7.15.0":
|
||||
version "7.15.0"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.15.0.tgz#d3aa650d11678ca76ce294071fda53d7804183b3"
|
||||
integrity sha512-sfHYkLGjhzWTq6xsuQ01oEsUYjkHRux9fW1iUA68dC7Qd8BS1Unq4aZ8itmQp95zUzIcyR2EbNMTzAicFj+guw==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.14.5"
|
||||
"@babel/helper-plugin-utils" "^7.14.5"
|
||||
babel-plugin-polyfill-corejs2 "^0.2.2"
|
||||
babel-plugin-polyfill-corejs3 "^0.2.2"
|
||||
babel-plugin-polyfill-regenerator "^0.2.2"
|
||||
semver "^6.3.0"
|
||||
|
||||
"@babel/plugin-transform-shorthand-properties@^7.12.1", "@babel/plugin-transform-shorthand-properties@^7.14.5":
|
||||
version "7.14.5"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz#97f13855f1409338d8cadcbaca670ad79e091a58"
|
||||
|
@ -1275,7 +1287,7 @@
|
|||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.14.8", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
|
||||
"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.11.2", "@babel/runtime@^7.12.5", "@babel/runtime@^7.14.0", "@babel/runtime@^7.14.8", "@babel/runtime@^7.15.3", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2":
|
||||
version "7.15.3"
|
||||
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.3.tgz#2e1c2880ca118e5b2f9988322bd8a7656a32502b"
|
||||
integrity sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==
|
||||
|
@ -1868,6 +1880,14 @@
|
|||
"@rollup/pluginutils" "^3.1.0"
|
||||
magic-string "^0.25.7"
|
||||
|
||||
"@rollup/plugin-typescript@^8.2.5":
|
||||
version "8.2.5"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/plugin-typescript/-/plugin-typescript-8.2.5.tgz#e0319761b2b5105615e5a0c371ae05bc2984b7de"
|
||||
integrity sha512-QL/LvDol/PAGB2O0S7/+q2HpSUNodpw7z6nGn9BfoVCPOZ0r4EALrojFU29Bkoi2Hr2jgTocTejJ5GGWZfOxbQ==
|
||||
dependencies:
|
||||
"@rollup/pluginutils" "^3.1.0"
|
||||
resolve "^1.17.0"
|
||||
|
||||
"@rollup/pluginutils@^3.0.8", "@rollup/pluginutils@^3.1.0":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@rollup/pluginutils/-/pluginutils-3.1.0.tgz#706b4524ee6dc8b103b3c995533e5ad680c02b9b"
|
||||
|
@ -11739,7 +11759,7 @@ postcss@7.0.36, postcss@^7, postcss@^7.0.0, postcss@^7.0.1, postcss@^7.0.14, pos
|
|||
source-map "^0.6.1"
|
||||
supports-color "^6.1.0"
|
||||
|
||||
postcss@^8.1.0:
|
||||
postcss@^8.1.0, postcss@^8.3.6:
|
||||
version "8.3.6"
|
||||
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.3.6.tgz#2730dd76a97969f37f53b9a6096197be311cc4ea"
|
||||
integrity sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==
|
||||
|
|
Loading…
Reference in a new issue