Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ yarn-error.log*

# vscode plugin
*.vsix

# npm pack artifacts
*.tgz
13 changes: 13 additions & 0 deletions packages/raystack/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Exclude test files
**/__tests__/
**/__tests__/**
# Exclude dev files
vitest.setup.*
figma/
figma/**
# Exclude bundled dependencies
node_modules/
node_modules/**
_virtual/
_virtual/**

1 change: 1 addition & 0 deletions packages/raystack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"react": "^19.0.1",
"react-dom": "^19.0.1",
"rollup": "^3.25.1",
"rollup-plugin-node-externals": "^5.1.0",
"rollup-plugin-postcss": "^4.0.2",
"rollup-plugin-preserve-directives": "^0.4.0",
"rollup-plugin-tsconfig-paths": "^1.5.2",
Expand Down
18 changes: 17 additions & 1 deletion packages/raystack/rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,28 @@ import { nodeResolve } from '@rollup/plugin-node-resolve';
import typescript from '@rollup/plugin-typescript';
import svgr from '@svgr/rollup';
import postcssImport from 'postcss-import';
import nodeExternals from 'rollup-plugin-node-externals';
import postcss from 'rollup-plugin-postcss';
import preserveDirectives from 'rollup-plugin-preserve-directives';
import tsconfigPaths from 'rollup-plugin-tsconfig-paths';

const createPlugins = ({ rootDir, declarationDir }) => [
// Externalize all dependencies and peer dependencies
// This must be placed before nodeResolve() to work correctly
nodeExternals({
deps: true,
devDeps: false,
peerDeps: true,
optDeps: true,
// Note: Include deps with subpaths that need to be externalized in include array.
// https://github.com/Septh/rollup-plugin-node-externals?tab=readme-ov-file#1-this-plugin-is-smart
include: [
'react/jsx-runtime',
'react-dom/client',
/^dayjs\/plugin\/.*/,
/^@radix-ui\/.*/
]
}),
nodeResolve(),
commonjs(),
svgr({
Expand Down Expand Up @@ -100,7 +117,6 @@ const rollupConfig = configs.map(conf => {
preserveModulesRoot: conf.inputPath
}
],
external: ['react', 'react-dom', 'react-dom/client', 'react/jsx-runtime'],
plugins: createPlugins({
rootDir: conf.inputPath,
declarationDir: conf.outputPath
Expand Down
15 changes: 15 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading