wrangler-legacy icon indicating copy to clipboard operation
wrangler-legacy copied to clipboard

having issue with custom webpack config

Open littlechampsacademy opened this issue 4 years ago • 1 comments

🐛 Bug report

Describe the bug

A clear and concise description of the bug.

./html/index.html Module build failed (from ./node_modules/html-loader/dist/cjs.js): TypeError: this.getOptions is not a function at Object.loader (C:\Users\PC\Documents\Gitlab\wrangler test\my-website\node_modules\html-loader\dist\index.js:17:27) @ ./src/index.js 1:0-38 12:22-27 Error: webpack returned an error. Try configuringentryin your webpack config relative to the current working directory, or settingcontext = __dirname in your webpack config.

I am getting this error while i am trying to import a html file & serve it in my / path

Reproduce the bug

A list of steps to reproduce the bug.

  1. Follow the steps mentioned here https://joel.net/cloudflare-workers-as-a-web-server-with-webpack-lesson-2

Expected behavior

A clear and concise description of what you expected to happen. I just want my HTML file served on desired route,

Environment and versions

Fill out the following information about your environment.

  • operating system: Windows
  • output of wrangler -V: wrangler 1.19.3
  • output of node -v: v14.17.4
  • content of wrangler.toml: name = "api" type = "webpack" workers_dev = true account_id = "" route = "api.domain.com/*" zone_id = "" compatibility_date = "2021-09-24" kv_namespaces = []

littlechampsacademy avatar Oct 31 '21 17:10 littlechampsacademy

I'm experiencing this issue as well. If it helps, here are my environment details.

Environment and versions

Fill out the following information about your environment.

operating system: MacOS output of wrangler -V: wrangler 1.19.7 output of node -v: v16.11.1 content of wrangler.toml:

name = "vite-ssr-worker"
type = "webpack"
account_id = ""
workers_dev = true
webpack_config = "./webpack.config.js"

[site]
bucket = "./dist/client"
entry-point = "./worker"

archit-p avatar Jan 29 '22 02:01 archit-p

Thanks for reporting this issue! Wrangler v1 is now deprecated and support is only being provided for critical updates or security concerns. As such, we are closing this issue. New versions of Wrangler are maintained in the workers-sdk repo. If you are running into a similar issue with wrangler v2, please report it in the workers-sdk repo. For more info about wrangler v1 deprecation, please check out our blog post.

jspspike avatar Feb 27 '23 16:02 jspspike