set mode to development during dev
This commit is contained in:
parent
680ce2f79b
commit
df6b52736e
|
@ -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",
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
/// <reference types="vitest" />
|
||||
|
||||
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,
|
||||
},
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -46,9 +46,9 @@ export const Community = (props: Props) => {
|
|||
|
||||
return (
|
||||
<Router>
|
||||
<ProtocolProvider options={{ publicKey: props.publicKey }}>
|
||||
<AppProvider config={props}>
|
||||
<ThemeProvider theme={theme}>
|
||||
<ProtocolProvider options={{ publicKey: props.publicKey }}>
|
||||
<DialogProvider>
|
||||
<GlobalStyle />
|
||||
<Wrapper>
|
||||
|
@ -65,9 +65,9 @@ export const Community = (props: Props) => {
|
|||
</Routes>
|
||||
</Wrapper>
|
||||
</DialogProvider>
|
||||
</ProtocolProvider>
|
||||
</ThemeProvider>
|
||||
</AppProvider>
|
||||
</ProtocolProvider>
|
||||
</Router>
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue