Open exvuma opened 5 years ago
workers-site
is not in this template
workers-site
is not in this template
Correct nor worker
until build time. We would be adding a new directory concept: src
. (which yes seems simple enough but then we have worker-site
for site projects) I just think it's confusing that we are defining all these different directories. Also, the other templates just use index.js
so it'd be another chore to change all the others.
I am open more opinions though if we think this should be a priority
yeah. this is just how i structure projects, it gets really messy really quick if you want to start adding more files other than index.js
which is why i like a src
directory. it's a very common pattern that i dont think people would be confused by and seems separate from the concerns about build directories.
I also add src
as soon as a project gets complex, but just switching to webpack doesn't necessarily mean that we need to add src
here, right? afaik our webpack
type looks for index.js
Have this default template use webpack as a type in wrangler.toml
Then move index.js to
./src/index.js
and update package.json?I am not sure if it will confuse users by now having
src
,workers-site
andworker
directories that all contain a worker script though. This probably needs design