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

feat: implement rules config field #530

Merged
merged 1 commit into from
Feb 28, 2022
Merged

Commits on Feb 28, 2022

  1. feat: implement rules config field

    This implements the top level `rules` configuration field. It lets you specify transport rules for non-js modules. For example, you can specify `*.md` files to be included as a text file with -
    
    ```
    [[rules]]
    {type = "Text", globs = ["**/*.md"]}
    ```
    
    We also include a default ruleset -
    
    ```
      { type: "Text", globs: ["**/*.txt", "**/*.html"] },
      { type: "Data", globs: ["**/*.bin"] },
      { type: "CompiledWasm", globs: ["**/*.wasm"] },
    ```
    
    More info at https://developers.cloudflare.com/workers/cli-wrangler/configuration/#build.
    
    Known issues -
    
    - non-wasm module types do not work in `--local` mode
    - `Data` type does not work in service worker format, in either mode
    threepointone committed Feb 28, 2022
    Configuration menu
    Copy the full SHA
    9cfaec8 View commit details
    Browse the repository at this point in the history