Skip to content

Commit

Permalink
feat: load .env as cjs
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurgeron committed Oct 28, 2024
1 parent 3cf1a73 commit 8ca9818
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/app/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import baseDefaultConfig from '@fuel-ui/test-utils/config';
import type { JestConfigWithTsJest } from 'ts-jest';
import { defaultsESM as tsjPreset } from 'ts-jest/presets';

import { getPublicEnvs } from './load.envs';
import { getPublicEnvs } from './load.envs.cjs';
import pkg from './package.json';

const { globals, preset, ...baseConfig } = baseDefaultConfig;
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/app/manifest.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { defineManifest } from '@crxjs/vite-plugin';

import './load.envs.js';
import './load.envs.cjs';

// When releasing a stable version we need to inform for the build
// to use the white logo instead of the black one
Expand Down
5 changes: 3 additions & 2 deletions packages/app/tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true,
"resolveJsonModule": true
"resolveJsonModule": true,
"outDir": "dist-crx"
},
"include": [
"load.envs.js",
"load.envs.cjs",
"./src/exports.ts",
"env.d.ts",
"playwright/**/*.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/vite-utils/vite.base.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cleanPlugin from 'vite-plugin-clean';
import { Mode, plugin as viteMdPlugin } from 'vite-plugin-markdown';
import tsconfigPaths from 'vite-tsconfig-paths';

import '../load.envs.js';
import '../load.envs.cjs';

const linkDeps = process.env.LINK_DEPS?.trim().split(' ').filter(Boolean) || [];

Expand Down

0 comments on commit 8ca9818

Please sign in to comment.