diff --git a/Installer/Distribution/Defaults/pipeline.yaml b/Installer/Distribution/Defaults/pipeline.yaml index 364d63b..ff7c130 100644 --- a/Installer/Distribution/Defaults/pipeline.yaml +++ b/Installer/Distribution/Defaults/pipeline.yaml @@ -31,7 +31,7 @@ esbuild: # This is the same as passing --path to the ./flow configuration:show command # In Javascript the value is available under the variable FLOW # (e.g. FLOW.Flownative.Sentry) - setFlowSettings: false + defineFlowSettings: false # https://esbuild.github.io/api/#log-level logLevel: info # https://esbuild.github.io/api/#legal-comments diff --git a/Lib/esbuildHelper.mjs b/Lib/esbuildHelper.mjs index e22ee99..9a7d9d9 100644 --- a/Lib/esbuildHelper.mjs +++ b/Lib/esbuildHelper.mjs @@ -106,6 +106,6 @@ async function importPlugins() { const logLevel = config.esbuild?.logLevel || "info"; const legalComments = config.esbuild?.legalComments || "linked"; -const flowSettings = readFlowSettings(config.esbuild.setFlowSettings); +const flowSettings = readFlowSettings(config.esbuild.defineFlowSettings); export { browserlist, logLevel, legalComments, writeFilesToAnotherPackage, importPlugins, flowSettings }; diff --git a/Readme.md b/Readme.md index e365e0b..6dfe3b3 100644 --- a/Readme.md +++ b/Readme.md @@ -270,11 +270,11 @@ By the way: [Alpine.js] is excellent in combination with [Tailwind CSS].
Flow Settings in Javascript -If you use tools like [Flownative.Sentry], you perhaps want to pass some of the settings to your Javascript, without setting a `data` attribute somewhere in the markup. For that, you can enable `esbuild.setFlowSettings`. If set to `true`, all settings are passed. It is recommended to set it to a path (e.g. `Flownative.Sentry`). This path is added as `--path` attribute to the `flow configuration:show` command. If you run `yarn build`, which has automatically the flag `--production`, the `FLOW_CONTEXT` is set to `Production`. +If you use tools like [Flownative.Sentry], you perhaps want to pass some of the settings to your Javascript, without setting a `data` attribute somewhere in the markup. For that, you can enable `esbuild.defineFlowSettings`. If set to `true`, all settings are passed. It is recommended to set it to a path (e.g. `Flownative.Sentry`). This path is added as `--path` attribute to the `flow configuration:show` command. If you run `yarn build`, which has automatically the flag `--production`, the `FLOW_CONTEXT` is set to `Production`. ```yaml esbuild: - setFlowSettings: Flownative.Sentry + defineFlowSettings: Flownative.Sentry ``` In Javascript, you can access the variables like this: diff --git a/defaults.yaml b/defaults.yaml index 216ed6b..5130d81 100644 --- a/defaults.yaml +++ b/defaults.yaml @@ -38,7 +38,7 @@ esbuild: # This is the same as passing --path to the ./flow configuration:show command # In Javascript the value is available under the variable FLOW # (e.g. FLOW.Flownative.Sentry) - setFlowSettings: false + defineFlowSettings: false # https://esbuild.github.io/api/#log-level logLevel: info # https://esbuild.github.io/api/#legal-comments