Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit d8bcf0a

Browse files
committed
refactor: ployfill -> polyfill
1 parent 578cd0e commit d8bcf0a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

server/project.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,10 @@ export class Project {
330330
const mainModule = this.#modules.get('/main.ts')!
331331
const depsModule = this.#modules.get('/deps.bundling.js')
332332
const sharedModule = this.#modules.get('/shared.bundling.js')
333-
const ployfillModule = this.#modules.get('/ployfill.js')
333+
const polyfillModule = this.#modules.get('/polyfill.js')
334334

335335
return [
336-
ployfillModule ? { src: util.cleanPath(`${baseUrl}/_aleph/ployfill.${ployfillModule.hash.slice(0, hashShort)}.js`) } : {},
336+
polyfillModule ? { src: util.cleanPath(`${baseUrl}/_aleph/polyfill.${polyfillModule.hash.slice(0, hashShort)}.js`) } : {},
337337
depsModule ? { src: util.cleanPath(`${baseUrl}/_aleph/deps.${depsModule.hash.slice(0, hashShort)}.js`), } : {},
338338
sharedModule ? { src: util.cleanPath(`${baseUrl}/_aleph/shared.${sharedModule.hash.slice(0, hashShort)}.js`), } : {},
339339
!this.isDev ? { src: util.cleanPath(`${baseUrl}/_aleph/main.${mainModule.sourceHash.slice(0, hashShort)}.js`), } : {},
@@ -1351,16 +1351,16 @@ export class Project {
13511351
const mainJSConent = await Deno.readTextFile(mainModule.bundlingFile)
13521352
await Deno.writeTextFile(mainJSFile, mainJSConent)
13531353

1354-
// create and copy ployfill
1355-
const ployfillMode = newModule('/ployfill.js')
1356-
ployfillMode.hash = ployfillMode.sourceHash = (new Sha1).update(header).update(`${this.config.buildTarget}-${VERSION}`).hex()
1357-
const ployfillFile = path.join(this.buildDir, `ployfill.${ployfillMode.hash.slice(0, hashShort)}.js`)
1358-
if (!existsFileSync(ployfillFile)) {
1359-
const rawPloyfillFile = `${alephPkgUrl}/compiler/ployfills/${this.config.buildTarget}/ployfill.js`
1360-
await this._runDenoBundle(rawPloyfillFile, ployfillFile, header, true)
1354+
// create and copy polyfill
1355+
const polyfillMode = newModule('/polyfill.js')
1356+
polyfillMode.hash = polyfillMode.sourceHash = (new Sha1).update(header).update(`${this.config.buildTarget}-${VERSION}`).hex()
1357+
const polyfillFile = path.join(this.buildDir, `polyfill.${polyfillMode.hash.slice(0, hashShort)}.js`)
1358+
if (!existsFileSync(polyfillFile)) {
1359+
const rawPolyfillFile = `${alephPkgUrl}/compiler/polyfills/${this.config.buildTarget}/polyfill.js`
1360+
await this._runDenoBundle(rawPolyfillFile, polyfillFile, header, true)
13611361
}
1362-
Deno.copyFile(ployfillFile, path.join(this.outputDir, '_aleph', `ployfill.${ployfillMode.hash.slice(0, hashShort)}.js`))
1363-
this.#modules.set(ployfillMode.url, ployfillMode)
1362+
Deno.copyFile(polyfillFile, path.join(this.outputDir, '_aleph', `polyfill.${polyfillMode.hash.slice(0, hashShort)}.js`))
1363+
this.#modules.set(polyfillMode.url, polyfillMode)
13641364

13651365
// bundle and copy page moudles
13661366
await Promise.all(pageModules.map(async mod => this._createPageBundle(mod, localDepList, header)))

0 commit comments

Comments
 (0)