-
Notifications
You must be signed in to change notification settings - Fork 788
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
Document/automate how to migrate from a Wrangler 1 webpack_config
/ webpack integration to Wrangler 2
#8
Comments
type
/ webpack_config
/ webpack integrationwebpack_config
/ webpack integration to Wrangler 2
So, since webpack_config is deprecated, what do I use? |
I want wrangler use webpack on production mode |
In Wrangler 2, we use esbuild to bundle the code into a single file (more or less) for uploading to Cloudflare. In
|
Never heard about
About the default behaviour of
About development Pipeline...
|
The output of esbuild is a bundled file where imports have been inlined (mostly) similar to webpack. Currently we are not minifying the output. What production mode features of webpack are you looking for here?
For now we are treating the bundler as an internal implementation aspect of Wrangler 2. So at the moment we are not allowing the bundling to be extended. There is an issue to track this: #234.
There is no default index file for Wrangler 2. It must be configured...
You can specify the entry-point index file for a Worker in a variety of ways:
Currently we do not have a facility to save the output from the bundling to disk.
If you are publishing from a CI where you cannot have an interactive login, you can currently specify an API token via the |
Ok also I read |
We pass all the options to esbuild programmatically, so it should not be reading anything from package.json. (And if it is then that is a bug!) |
You can see the options we pass here: |
@touhidurrr this should be fixed via #759, can you let us know if the webpack plugin works as expected? |
Dunno actually. Already moved to I tried |
Closing this anyway. Thank you @caass! |
wrangler v2 deprecates the
type
andwebpack_config
configurations, and it's overall webpack integration story.type
-javascript
andrust
don't make much sense anymore since it's really the same thing backing it. And we're going to encourage development in multiple languages (Go, python, what have you) since we want to have the bestwasm
support ever.TODO: as part of the effort to be backward compatible, we should have a super low-effort transition guide to moving existing webpack projects to the new wrangler (ideally, we should be able to automate it with a single command/codemod).
The text was updated successfully, but these errors were encountered: