Rich message rendering #24
1 changed files with 1 additions and 2 deletions
3
build.js
3
build.js
|
@ -147,7 +147,7 @@ async function addJS(sourcePath, targetPath) {
|
||||||
|
|
||||||
async function addBundle(sourcePath, targetPath, module = false) {
|
async function addBundle(sourcePath, targetPath, module = false) {
|
||||||
let opts = {}
|
let opts = {}
|
||||||
if(module) opts.standalone = sourcePath
|
if (module) opts.standalone = sourcePath
|
||||||
const content = await new Promise(resolve => {
|
const content = await new Promise(resolve => {
|
||||||
browserify([], opts)
|
browserify([], opts)
|
||||||
.add(pj(".", sourcePath))
|
.add(pj(".", sourcePath))
|
||||||
|
@ -175,7 +175,6 @@ async function addBundle(sourcePath, targetPath, module = false) {
|
||||||
})
|
})
|
||||||
const writer = fs.promises.writeFile(pj(buildDir, targetPath), content)
|
const writer = fs.promises.writeFile(pj(buildDir, targetPath), content)
|
||||||
staticFiles.set(sourcePath, `${targetPath}?static=${hash(content)}`)
|
staticFiles.set(sourcePath, `${targetPath}?static=${hash(content)}`)
|
||||||
runHint(sourcePath, content)
|
|
||||||
await writer
|
await writer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue