-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: New building process with rollup STC-358 (#139)
* chore: New building process with rollup STC-358 * chore: Fixed test script error STC-358
- Loading branch information
1 parent
631f7b4
commit 84dc255
Showing
3 changed files
with
1,444 additions
and
542 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { terser } from "rollup-plugin-terser" | ||
import typescript from "rollup-plugin-typescript2" | ||
import peerDepsExternal from "rollup-plugin-peer-deps-external" | ||
import cleaner from "rollup-plugin-cleaner" | ||
import babel from "@rollup/plugin-babel" | ||
import { DEFAULT_EXTENSIONS } from "@babel/core" | ||
import packageJson from "./package.json" | ||
|
||
export default { | ||
input: ["src/components/index.ts"], | ||
output: [ | ||
{ | ||
dir: `${packageJson.main.replace("components/index.js", "")}`, | ||
exports: "named", | ||
format: "cjs", | ||
sourcemap: true, | ||
preserveModules: true, | ||
preserveModulesRoot: "src", | ||
}, | ||
{ | ||
dir: `${packageJson.module.replace("components/index.js", "")}`, | ||
format: "esm", | ||
sourcemap: true, | ||
preserveModules: true, | ||
preserveModulesRoot: "src", | ||
}, | ||
], | ||
external: [ | ||
"classnames", | ||
"debounce", | ||
"lodash/memoize", | ||
"prop-types", | ||
"react", | ||
"react-dom", | ||
], | ||
plugins: [ | ||
cleaner({ | ||
targets: ["lib"], | ||
}), | ||
peerDepsExternal(), | ||
terser(), | ||
typescript({ | ||
exclude: ["node_modules/*", "**/*.stories.tsx", "**/*.test.tsx"], | ||
useTsconfigDeclarationDir: true, | ||
}), | ||
babel({ | ||
babelHelpers: "external", | ||
exclude: /node_modules/, | ||
extensions: [...DEFAULT_EXTENSIONS, ".ts", ".tsx"], | ||
plugins: ["@babel/plugin-external-helpers"], | ||
}), | ||
], | ||
} |
Oops, something went wrong.
84dc255
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for herzui ready!
✅ Preview
https://herzui-gral75lul-micromed.vercel.app
Built with commit 84dc255.
This pull request is being automatically deployed with vercel-action