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: --assets / config.assets to serve a folder of static assets #1237

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

threepointone
Copy link
Contributor

@threepointone threepointone commented Jun 12, 2022

This adds support for defining assets in wrangler.toml. You can configure it with a string path, or a {bucket, include, exclude} object (much like [site]). This also renames the --experimental-public arg as --assets.

Via #1162


Followup tasks (I'll make issues for each of these later, but logging here for visibility)

@changeset-bot
Copy link

changeset-bot bot commented Jun 12, 2022

🦋 Changeset detected

Latest commit: d71d3f0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wrangler Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Jun 12, 2022

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2516392147/npm-package-wrangler-1237

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1237/npm-package-wrangler-1237

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2516392147/npm-package-wrangler-1237 dev path/to/script.js

@threepointone threepointone force-pushed the config-assets branch 3 times, most recently from ca94b13 to fef6023 Compare June 16, 2022 11:40
@threepointone threepointone marked this pull request as ready for review June 16, 2022 11:43
@threepointone threepointone changed the title WIP feat: --assets / config.assets to serve a folder of static assets feat: --assets / config.assets to serve a folder of static assets Jun 16, 2022
Copy link
Contributor

@JacobMGEvans JacobMGEvans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a huge step forward for assets! 🥳

@threepointone
Copy link
Contributor Author

I'm going add an experimental warning on this and land it

This adds support for defining `assets` in `wrangler.toml`. You can configure it with a string path, or a `{bucket, include, exclude}` object (much like `[site]`). This also renames the `--experimental-public` arg as `--assets`.

Via #1162
@threepointone threepointone merged commit e1b8ac4 into main Jun 17, 2022
@threepointone threepointone deleted the config-assets branch June 17, 2022 15:26
@github-actions github-actions bot mentioned this pull request Jun 17, 2022
@mangs
Copy link

mangs commented Jun 17, 2022

Hooray! 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants