You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I'm using Vite's environment variables and then build -mode to build a different version, but something unexpected happens
To Reproduce
Steps to reproduce the behavior:
Use yarn build --mode xxx
Expected behavior
Normal build success
Screenshots
Hints on build errors
$ yarn build --mode prod-test
yarn run v1.22.19
$ vite build --mode prod-test
vite v3.0.9 building for prod-test...
✓ 1386 modules transformed.
'default' is not exported by node_modules/lodash.merge/index.js, imported by node_modules/@hope-ui/solid/dist/index.mjs
file: /Users/yanren/Code/caldance-market/node_modules/@hope-ui/solid/dist/index.mjs:24:7
22: import { createStore } from "solid-js/store";
23: import { createStitches, defaultThemeMap } from "@stitches/core";
24: import merge from "lodash.merge";
^
25: import { Transition, TransitionGroup } from "solid-transition-group";
26: import { createFocusTrap } from "focus-trap";
error during build:
Error: 'default' is not exported by node_modules/lodash.merge/index.js, imported by node_modules/@hope-ui/solid/dist/index.mjs
at error (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:1858:30)
at Module.error (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:12412:16)
at Module.traceVariable (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:12771:29)
at ModuleScope.findVariable (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:11423:39)
at FunctionScope.findVariable (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:6355:38)
at ChildScope.findVariable (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:6355:38)
at Identifier.bind (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:7422:40)
at CallExpression.bind (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:5252:23)
at CallExpression.bind (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:8918:15)
at ConditionalExpression.bind (file:///Users/yanren/Code/caldance-market/node_modules/rollup/dist/es/shared/rollup.js:5252:23)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Hi, sorry for the late response, unfortunately i'm not skilled enough about build tool to help
That's fine, I've used vite's envDir function to achieve a similar effect. I'm not quite sure what the cause of the problem is at the moment though, so I'll look into it next time I come across it.
Describe the bug
I'm using Vite's environment variables and then
build -mode
to build a different version, but something unexpected happensTo Reproduce
Steps to reproduce the behavior:
Use
yarn build --mode xxx
Expected behavior
Normal build success
Screenshots
Hints on build errors
package.json
vite.config.ts
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: