Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent assetsBuildDirectory path in "build/server/assets/server-build-[hash].js" while nested building in Windows #18418

Closed
7 tasks done
adelriosantiago opened this issue Oct 22, 2024 · 1 comment

Comments

@adelriosantiago
Copy link

Describe the bug

The assetsBuildDirectory path inside "build/server/assets/server-build-[hash].js" is not consistent with other path formats in the same file when building in Windows.

In Windows, when using buildDirectory: 'build/subdir' and buildDirectory: 'build\\subdir' will both generate a build at "build/server/assets/server-build-[hash].js" that contains:

//...
const mode = "pre-prod";
const assetsBuildDirectory = "artifacts\\test\\client";
const basename = "/";
//...

All other folder separators are correct, except assetsBuildDirectory . This breaks builds done in Windows that are then transferred to a Linux machine for deploy in Azure.

Reproduction

Can't reproduce in view.new unfortunately

Steps to reproduce

-Grab a project with a vite.config.js.
-Build in Windows with buildDirectory: 'build/subdir' then with buildDirectory: 'build\\subdir'
-Both "build/server/assets/server-build-[hash].js" builds generate the same "assetsBuildDirectory" which is correct in Windows, but not in Linux.
-I would expect: The "assetsBuildDirectory" to have "/".

System Info

System:
    OS: Windows 10 10.0.19045
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 7.72 GB / 15.95 GB
  Binaries:
    Node: 20.13.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 10.5.2 - C:\Program Files\nodejs\npm.CMD
    pnpm: 9.4.0 - ~\AppData\Roaming\npm\pnpm.CMD
  Browsers:
    Edge: Chromium (128.0.2739.79)
    Internet Explorer: 11.0.19041.4355

Used Package Manager

npm

Logs

No response

Validations

@sapphi-red
Copy link
Member

I guess assetsBuildDirectory is an option in remix and not Vite. Please make the issue in remix-run/remix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants