Skip to content

How does System.import() work? #275

Closed
@pksjce

Description

@pksjce

Premise
System.import() allows webpack to define split points for code splitting using es6 modules. It is a replacement for require.ensure()

Findings

  • Multiple dependencies cannot be imported using System.import() alone. We need to Promise.all[System.import(), System.import()]. But as per System.load support? webpack#3141, that does not work as expected as well.
  • Named chunks are not possible using System.import(). require.ensure() has a parameter that allows us to name the chunks, hence separating or combining code from other split points in the application. This does not seem to be available with System.import()

Ask
System.import() does not seem to be a perfect replacement and seems to create more problems. Are there workarounds for these issues?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions