An example repo demonstrating how to use Webpack with PlatformIO targeting the ESP32 platform.
- The root of this repo was generated with
pio init
. - The ./web directory was generated using NeutrinoJS 9.0.0-rc.5.
./dist/web_assets.h
is generated by Webpack. And needs to exist during compile.- Webpack is invoked during the PlatformIO build via
./build_web.py
. - Each asset (Webpack "pack") is put in its on progmem byte array and backed by a
const char*
map.
- Web sources are in ./web.
- Within that directory, you can run the build with
npm run build
or start a development server withnpm run start
.
- The web server is backed by RichHttpServer.
- The entrypoint is ExampleWebServer.cpp.