diff --git a/packages/status-js/package.json b/packages/status-js/package.json index 4c9f340..623d0a7 100644 --- a/packages/status-js/package.json +++ b/packages/status-js/package.json @@ -19,7 +19,7 @@ "url": "https://github.com/status-im/status-web/issues" }, "scripts": { - "dev": "vite build --watch", + "dev": "vite build --watch --mode development", "build": "vite build && yarn typegen", "test": "vitest", "lint": "eslint src", diff --git a/packages/status-js/vite.config.ts b/packages/status-js/vite.config.ts index 1d05f78..96cb40f 100644 --- a/packages/status-js/vite.config.ts +++ b/packages/status-js/vite.config.ts @@ -1,6 +1,5 @@ /// -import { resolve } from 'node:path' import { defineConfig } from 'vite' import { dependencies } from './package.json' @@ -10,21 +9,17 @@ const external = [ // ...Object.keys(peerDependencies || {}), ].map(name => new RegExp(`^${name}(/.*)?`)) -export default defineConfig(({ command }) => { +export default defineConfig(({ mode }) => { return { - resolve: { - alias: { - '~': resolve('.'), - }, - }, build: { + target: 'es2020', lib: { entry: './src/index.ts', fileName: 'index', formats: ['es'], }, - target: 'es2020', - emptyOutDir: command === 'build', + sourcemap: true, + emptyOutDir: mode === 'production', rollupOptions: { external, }, diff --git a/packages/status-react/package.json b/packages/status-react/package.json index da98e81..9c7a075 100644 --- a/packages/status-react/package.json +++ b/packages/status-react/package.json @@ -19,7 +19,7 @@ "url": "https://github.com/status-im/status-web/issues" }, "scripts": { - "dev": "vite build --watch", + "dev": "vite build --watch --mode development", "build": "vite build && yarn typegen", "#test": "vitest", "typecheck": "tsc", diff --git a/packages/status-react/src/routes/index.tsx b/packages/status-react/src/routes/index.tsx index ee418bb..9583da3 100644 --- a/packages/status-react/src/routes/index.tsx +++ b/packages/status-react/src/routes/index.tsx @@ -46,9 +46,9 @@ export const Community = (props: Props) => { return ( - - - + + + @@ -65,9 +65,9 @@ export const Community = (props: Props) => { - - - + + + ) } diff --git a/packages/status-react/vite.config.ts b/packages/status-react/vite.config.ts index ad770ec..3103369 100644 --- a/packages/status-react/vite.config.ts +++ b/packages/status-react/vite.config.ts @@ -11,7 +11,7 @@ const external = [ ...Object.keys(peerDependencies || {}), ].map(name => new RegExp(`^${name}(/.*)?`)) -export default defineConfig(({ command }) => { +export default defineConfig(({ mode }) => { return { resolve: { alias: { @@ -19,15 +19,14 @@ export default defineConfig(({ command }) => { }, }, build: { + target: 'es2020', lib: { entry: './src/index.tsx', fileName: 'index', formats: ['es'], }, - emptyOutDir: command === 'build', - // sourcemap: true, - target: 'es2020', - + sourcemap: true, + emptyOutDir: mode === 'production', rollupOptions: { external, },