mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 06:34:05 -08:00
fix(editor): Fix Vite dev mode (no-changelog) (#5475)
because of the updated dev tooling in https://github.com/n8n-io/n8n/pull/5454, vite dev mode is crashing because of the `util` package looking for `process.env`.
This commit is contained in:
parent
36108f82a1
commit
522ddfc0cd
|
@ -51,11 +51,14 @@ const lodashAliases = ['orderBy', 'camelCase', 'cloneDeep', 'isEqual', 'startCas
|
|||
replacement: require.resolve(`lodash-es/${name}`),
|
||||
}));
|
||||
|
||||
const { NODE_ENV } = process.env;
|
||||
|
||||
export default mergeConfig(
|
||||
defineConfig({
|
||||
define: {
|
||||
// This causes test to fail but is required for actually running it
|
||||
...(process.env.NODE_ENV !== 'test' ? { global: 'globalThis' } : {}),
|
||||
...(NODE_ENV !== 'test' ? { global: 'globalThis' } : {}),
|
||||
...(NODE_ENV === 'development' ? { process: { env: {} } } : {}),
|
||||
BASE_PATH: `'${publicPath}'`,
|
||||
},
|
||||
plugins: [
|
||||
|
|
Loading…
Reference in a new issue