Skip to content

Commit

Permalink
fix(rollup): remove rollup and fix ts and vite for building
Browse files Browse the repository at this point in the history
  • Loading branch information
panvourtsis committed May 21, 2024
1 parent 7fa291b commit 478a6d9
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 20 deletions.
6 changes: 0 additions & 6 deletions globals.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
declare module '*.md';
declare module 'babel-plugin-require-context-hook/register';

declare module '*.svg?react' {
const content: any;
export const ReactComponent: any;
export default content;
}
12 changes: 0 additions & 12 deletions rollup.config.js

This file was deleted.

6 changes: 6 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
"outDir": "dist",
"rootDir": "./",
"baseUrl": "./src",
"paths": {
"~/*": ["./*"],
"hooks/*": ["./hooks/*"],
"theme/*": ["./theme/*"],
"components/*": ["./components/*"]
},
"lib": ["ES2020", "DOM", "DOM.Iterable", "ESNext"],
"moduleResolution": "bundler",
"sourceMap": true,
Expand Down
3 changes: 1 addition & 2 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import path from 'path';
import { optimizeLodashImports } from '@optimize-lodash/rollup-plugin';
import react from '@vitejs/plugin-react';
import { defineConfig, loadEnv } from 'vite';
import type { UserConfig } from 'vite';
import type * as vite from 'vite';
import dts from 'vite-plugin-dts';
import svgr from 'vite-plugin-svgr';
Expand Down Expand Up @@ -34,7 +33,7 @@ const plugins = [
optimizeLodashImports() as vite.Plugin,
];
// https://vitejs.dev/config/
export default defineConfig(({ mode }: { mode: string }): UserConfig => {
export default defineConfig(({ mode }) => {
// Load env file based on `mode` in the current working directory.
// Set the third parameter to '' to load all env regardless of the `REACT_APP_` prefix.
const env = loadEnv(mode, process.cwd(), '');
Expand Down

0 comments on commit 478a6d9

Please sign in to comment.