nitro icon indicating copy to clipboard operation
nitro copied to clipboard

Optional array dedupe for wrangler.toml

Open oritwoen opened this issue 1 month ago • 0 comments

Environment

------------------------------
- Operating System: Linux
- Node Version:     v20.13.0
- Nuxt Version:     3.12.0-28588152.416d76ab
- CLI Version:      3.11.2-1712838256.8df35eb
- Nitro Version:    2.10.0-28585081.346a4950
- Package Manager:  [email protected]
- Builder:          -
- User Config:      future, routeRules, app, modules, extends, colorMode, experimental, runtimeConfig, image, devtools, nitro, ui, vueuse, vue, eslint, hub
- Runtime Modules:  @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @nuxt/[email protected], @vueuse/[email protected], @nuxt/test-utils/[email protected], @nuxthub/[email protected]
- Build Modules:    -
------------------------------

Reproduction

Set below config in nuxt.config.ts

nitro: {
    preset: 'cloudflare-pages',
    cloudflare: {
        wrangler: {
            name: 'website',
            compatibility_flags: ['nodejs_compat'],
	},
    }
},

Describe the bug

With each build, an identical flag is added as in the screenshot.

Theoretically, this is not a bug because in case of one-time generation, i.e. the main assumption, it will work correctly in CI.

However, if you want to test several builds locally, you have to delete the wrangler.toml file each time because wrangler pages dev gives the following error:

✘ [ERROR] service core:user:website: Compatibility flag specified multiple times: nodejs_compat

Zrzut ekranu z 2024-05-11 19-58-23

Additional context

No response

Logs

No response

oritwoen avatar May 11 '24 17:05 oritwoen