Skip to content
Snippets Groups Projects
Commit 5a404f05 authored by Philipp Stadler's avatar Philipp Stadler
Browse files

chore: allow absolute prefix in parcel

parent c910642f
No related branches found
No related tags found
1 merge request!135Feat/external build
const process = require('process')
const serveStatic = require("serve-static")
module.exports = function (app) {
console.error(('proxy config'))
if (!('BUILD_PREFIX' in process.env)) {
throw new Error(`Dunno where the chardata at, what BUILD_PREFIX?`)
}
const dir = `./${process.env.BUILD_PREFIX}hanzi-data`
const dir = `${process.env.BUILD_PREFIX}hanzi-data`
app.use("/hanzi-data", serveStatic(dir))
console.error(('ok configured at '), dir)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment