langri-sha / screeps-webpack-plugin

Bundle and push your AI to Screeps servers
MIT License
5 stars 4 forks source link

The example setup is invalid #25

Closed pranaygp closed 7 years ago

pranaygp commented 7 years ago

2 things wrong with the example code on your README:

  1. You a have a typo
  2. It was a pain to figure out how to get this to work (when it commits to screeps, nothing happens since screeps expects a module.exports but instead, webpack builds to a var target by default. This is easily fixed by passing in the right output.libraryTarget to the webpack config (the exported file should export as a commonjs module, not a variable)

This should significantly help anyone else planning to use the repo 👍

I've made a PR for these issues

langri-sha commented 7 years ago

Thanks for the help @pranaygp