Skip to content

Commit

Permalink
fix: Remove instances of process variable from build output (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
imprashast authored Aug 15, 2024
1 parent 2fe4ee3 commit b2c0ff9
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
2 changes: 1 addition & 1 deletion components/util/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function detectLocale(): SupportedLocale {
* Server locale detection. This requires e.g LANG environment variable to be set on the server.
*/
const serverLocale =
process.env.NMP_LANGUAGE ||
process?.env?.NMP_LANGUAGE ||
Intl.DateTimeFormat().resolvedOptions().locale;
return getSupportedLocale(serverLocale);
}
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@lingui/core": "4.11.2",
"@warp-ds/core": "1.1.5",
"@warp-ds/css": "2.0.0",
"@warp-ds/icons": "2.0.2",
"@warp-ds/icons": "2.1.0-next.4",
"@warp-ds/uno": "2.x",
"create-v-model": "2.2.0",
"dom-focus-lock": "1.1.0",
Expand All @@ -71,6 +71,7 @@
"@lingui/conf": "4.11.2",
"@lingui/extractor-vue": "4.11.2",
"@lukeed/uuid": "2.0.1",
"@rollup/plugin-replace": "^5.0.7",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"@storybook/addon-actions": "8.2.1",
Expand All @@ -80,10 +81,10 @@
"@storybook/blocks": "8.2.1",
"@storybook/builder-vite": "8.2.1",
"@storybook/cli": "8.2.1",
"@storybook/test-runner": "0.19.0",
"@storybook/test": "8.2.1",
"@storybook/vue3-vite": "8.2.1",
"@storybook/test-runner": "0.19.0",
"@storybook/vue3": "8.2.1",
"@storybook/vue3-vite": "8.2.1",
"@testing-library/jest-dom": "6.4.8",
"@testing-library/vue": "8.1.0",
"@vitejs/plugin-vue": "5.0.5",
Expand Down
31 changes: 24 additions & 7 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions vite.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import rollupPluginReplace from '@rollup/plugin-replace';
import vue from '@vitejs/plugin-vue';
import { classes } from '@warp-ds/css/component-classes/classes';
import { presetWarp } from '@warp-ds/uno';
Expand All @@ -14,6 +15,10 @@ export default defineConfig((env) => ({
presets: [presetWarp({ skipResets: true })],
safelist: classes,
}),
rollupPluginReplace({
'process.env.NODE_ENV': JSON.stringify('production'),
preventAssignment: true,
}),
env.mode !== 'lib' && VitEik(),
MinifyWarpLib(),
],
Expand Down

0 comments on commit b2c0ff9

Please sign in to comment.