@aziontech/bundler 1.1.4 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -0
- package/dist/index-Dx9B4Utx.js +2290 -0
- package/dist/index.js +93 -58
- package/dist/utils-CSEkDVys.js +399 -0
- package/package.json +9 -9
- package/dist/index-CgialJ1S.js +0 -2165
- package/dist/utils-B43tliMf.js +0 -377
package/README.md
CHANGED
|
@@ -128,11 +128,40 @@ Options:
|
|
|
128
128
|
-d, --dev Build in development mode (default: false)
|
|
129
129
|
-x, --experimental Enable experimental features (default: false)
|
|
130
130
|
--skip-framework-build Skip framework build step (default: false)
|
|
131
|
+
--config-version <version> Config (Azion API) version: 3, 4 or 6. Overrides the `version` field of azion.config (default: 4)
|
|
132
|
+
--config-file <path> Path to the azion.config file to use (default: azion.config.* found in the current directory)
|
|
131
133
|
--only-generate-config Build only generate azion.config (default: false)
|
|
132
134
|
--telemetry [format] Enable telemetry output (console, json, html or both; defaults to both)
|
|
133
135
|
--alias-env Rewrite env var names to a per-project prefix to avoid cross-project naming collisions (default: false)
|
|
134
136
|
```
|
|
135
137
|
|
|
138
|
+
#### Config version
|
|
139
|
+
|
|
140
|
+
The bundler can target the Azion API v3 or v4 config. The version is resolved in this order:
|
|
141
|
+
|
|
142
|
+
1. `--config-version` (also available on `dev`, `manifest` and `presets config`)
|
|
143
|
+
2. the `version` field of your `azion.config`
|
|
144
|
+
3. the default, `4`
|
|
145
|
+
|
|
146
|
+
If you already use the v3 config, add `version: 3` to your `azion.config` (or pass `--config-version 3`). When there is no `azion.config`, the generated one is created from the preset for the resolved version and declares `version` explicitly. Using the flag and a different `version` in `azion.config` is an error.
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
azbundler build --preset react --config-version 3
|
|
150
|
+
azbundler presets config react --config-version 3
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
#### Config file
|
|
154
|
+
|
|
155
|
+
By default the bundler looks for `azion.config.*` in the current directory. Use `--config-file` to point to another file, for example one per environment. It is available on `build`, `dev`, `manifest`, `config` and `presets config`.
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
azbundler build --config-file ./azion.staging.config.ts
|
|
159
|
+
azbundler dev --config-file ./azion.staging.config.ts
|
|
160
|
+
azbundler config read -a --config-file ./azion.staging.config.ts
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
Relative paths are resolved from the current directory. If the file does not exist the command fails, it does not fall back to the default `azion.config`. The bundler never generates an `azion.config` when `--config-file` is used. In `dev`, changes to the given file rebuild the project, even when it is outside the project directory. On `manifest`, `-e/--entry` takes precedence over `--config-file`, and the `transform` action ignores it. On `config`, `create` and `delete` need a `.js`, `.mjs`, `.cjs` or `.ts` file.
|
|
164
|
+
|
|
136
165
|
### `dev`
|
|
137
166
|
|
|
138
167
|
Starts a local development environment.
|
|
@@ -148,6 +177,8 @@ Options:
|
|
|
148
177
|
-x, --experimental Enable experimental features (default: false)
|
|
149
178
|
--skip-framework-build Skip framework build step (default: false)
|
|
150
179
|
--function-name <name> Specify the function name
|
|
180
|
+
--config-version <version> Config (Azion API) version: 3, 4 or 6. Overrides the `version` field of azion.config (default: 4)
|
|
181
|
+
--config-file <path> Path to the azion.config file to use (default: azion.config.* found in the current directory)
|
|
151
182
|
```
|
|
152
183
|
|
|
153
184
|
### `config`
|