refactor: exclude scripts from asset payload
This commit is contained in:
parent
782fdfc28c
commit
bd5c069090
|
@ -25,7 +25,7 @@ async function computeAsset(path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function assetPaths() {
|
async function assetPaths() {
|
||||||
return glob(RESOURCES_GLOB, {nodir: true});
|
return glob(RESOURCES_GLOB, {ignore: '**/*.js', nodir: true});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createManifest() {
|
export async function createManifest() {
|
||||||
|
@ -48,7 +48,7 @@ export async function loadManifest() {
|
||||||
for (const path in created) {
|
for (const path in created) {
|
||||||
manifest[path] = created[path];
|
manifest[path] = created[path];
|
||||||
}
|
}
|
||||||
const watcher = chokidar.watch(RESOURCES_GLOB);
|
const watcher = chokidar.watch(RESOURCES_GLOB, {ignored: '**/*.js'});
|
||||||
watcher.on('add', async (path) => {
|
watcher.on('add', async (path) => {
|
||||||
const asset = await computeAsset(path);
|
const asset = await computeAsset(path);
|
||||||
manifest[asset.path] = asset.hash.toString('hex');
|
manifest[asset.path] = asset.hash.toString('hex');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user