mirror of
https://github.com/webstudio-is/webstudio.git
synced 2026-11-07 04:23:40 +09:00
## Description
Read constants.mjs during prebuild step and use that constants. (need
for saas and other templates)
Fixes windows version of cli. Now everything works on windows platform
too.
Changes:
using `execa` instead of `exec`
using `import { fileURLToPath } from "node:url";` instead of
url.pathname
do not using `join` for import generation
<img width="975" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/761cd741-d609-48ef-a54a-027fe3f0d49f">
<img width="975" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/52c9f2d7-4389-4bb6-8fa7-5329a4b6d9c8">
<img width="972" alt="image"
src="https://github.com/webstudio-is/webstudio/assets/5077042/cb5d2c1d-34d9-412d-942e-c78276c9dd6c">
## Steps for reproduction
1. click button
2. expect xyz
## Code Review
- [ ] hi @kof, I need you to do
- conceptual review (architecture, feature-correctness)
- detailed review (read every line)
- test it on preview
## Before requesting a review
- [ ] made a self-review
- [ ] added inline comments where things may be not obvious (the "why",
not "what")
## Before merging
- [ ] tested locally and on preview environment (preview dev login:
5de6)
- [ ] updated [test
cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md)
document
- [ ] added tests
- [ ] if any new env variables are added, added them to `.env.example`
and the `builder/env-check.js` if mandatory
13 lines
285 B
JSON
13 lines
285 B
JSON
{
|
|
"extends": "@webstudio-is/tsconfig/base.json",
|
|
"include": ["**/*.ts", "**/*.tsx", "**/*.mjs"],
|
|
"compilerOptions": {
|
|
"module": "esnext",
|
|
"allowJs": true,
|
|
"checkJs": true,
|
|
"paths": {
|
|
"~/constants.mjs": ["./templates/defaults/app/constants.mjs"]
|
|
}
|
|
}
|
|
}
|