INNER CODE UNIT · TypeScript

rootJSName

onejs/one · packages/compiler/src/index.ts:327

          const rootJSName = Object.keys(bundle).find((i) => {
            const chunk = bundle[i]
            return (
              chunk.type == 'chunk' && chunk.fileName.match(/.[cm]?js(?:\?.+)?$/) != null
            )
          })
          if (!rootJSName) {
            throw new Error(`Can't find root js, internal one error`)
          }

          const rootJS = bundle[rootJSName] as unknown as OutputChunk

          const cssAssets = Object.keys(bundle).filter((i) =>
            bundle[i].fileName.endsWith('.css.js')
          )

          for (const name of cssAssets) {
            delete bundle[name]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…