Skip to content

Commit

Permalink
Improved vite and tailwind packages
Browse files Browse the repository at this point in the history
  • Loading branch information
macieklad committed May 2, 2024
1 parent abeef98 commit f7a27b5
Show file tree
Hide file tree
Showing 27 changed files with 1,242 additions and 621 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"@changesets/cli": "^2.27.1",
"@playwright/test": "^1.41.2",
"@total-typescript/ts-reset": "^0.5.1",
"@types/node": "^20.12.8",
"eslint": "~8.57.0",
"husky": "^9.0.11",
"is-ci": "^3.0.1",
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@
"devDependencies": {
"@acme/style-guide": "workspace:*",
"@acme/vite": "workspace:*",
"@tsconfig/vite-react": "^2.0.1",
"@types/react": "^18.2.73",
"typescript": "~5.3.3",
"vite": "^5.2.7",
"vitest": "^1.3.0"
"typescript": "~5.4.5",
"vite": "^5.2.11",
"vitest": "^1.5.3"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { PropsWithChildren } from 'react';

export function MyComp(props: PropsWithChildren) {
export function Component(props: PropsWithChildren) {
return <div>{props.children}</div>;
}
7 changes: 7 additions & 0 deletions packages/react-package-template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": "@tsconfig/vite-react/tsconfig.json",
"compilerOptions": {
"resolveJsonModule": true
},
"include": ["./src/", "./vite.config.ts"]
}
27 changes: 27 additions & 0 deletions packages/react-package-template/vite.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/// <reference types="vitest" />
/// <reference types="vitest/globals" />
import { resolve } from 'node:path';
import { defineConfig } from 'vitest/config';
import { library } from '@acme/vite/presets';
import pkg from './package.json';

export default defineConfig({
test: {
globals: true,
},
plugins: [
library({
// You can pass the dependencies from package.json
// which will be marked as external and will not be bundled
externalDependencies: pkg.devDependencies,
}),
],
build: {
lib: {
name: '@acme/library',
entry: {
index: resolve(__dirname, 'src/index.tsx'),
},
},
},
});
4 changes: 0 additions & 4 deletions packages/react-package/tsconfig.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/react-package/vite.config.ts

This file was deleted.

Loading

0 comments on commit f7a27b5

Please sign in to comment.