Skip to content
This repository was archived by the owner on Apr 25, 2024. It is now read-only.
This repository was archived by the owner on Apr 25, 2024. It is now read-only.

Not all dynamic imports receive proper names at build time #85

@andymantell

Description

@andymantell

Govuk js is imported dynamically and given names with webpack magic comments as follows:

      if (typeof document !== 'undefined') {
        const { default: ButtonJS } = await import(
          /* webpackChunkName: "govuk-frontend-button" */
          /* webpackMode: "lazy" */
          /* webpackPrefetch: true */
          'govuk-frontend/govuk/components/button/button'
        );

        new ButtonJS(buttonRef.current).init();
      }

However, not all of the output files have their names assigned correctly. For example, this is the build output from govuk-react-jsx-examples:

image

Need to work out why...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions