Closed ericclemmons closed 5 years ago
https://github.com/ericclemmons/back-to-the-fixture/ does this well!
This is even better!
const Bundler = require("parcel-bundler");
const bundler = new Bundler("./src/index.html", { outDir: "./public" });
module.exports = bundler.middleware();
The trick here is to use ./src
for the source, and write out to ./public
.
(polydev
could expose dist
, but I think that's not specific enough, since other build tools could expose server-side files to dist
)
This works pretty easily via this:
But I still want to enable
index.*.js
to support apackage.json
.