gatsby-plugin-sentry icon indicating copy to clipboard operation
gatsby-plugin-sentry copied to clipboard

Replace require.ensure() with import()

Open antoinerousseau opened this issue 6 years ago • 4 comments

The recommended way to split code in Gatsby v2 is by using import(). https://www.gatsbyjs.org/docs/how-code-splitting-works/

antoinerousseau avatar Jan 28 '19 12:01 antoinerousseau

@octalmage @mickeyreiss can you review this please?

antoinerousseau avatar Mar 26 '19 09:03 antoinerousseau

I’ll check it out later today hopefully (or this week).

octalmage avatar Mar 26 '19 15:03 octalmage

@mickeyreiss I don't think this is Gatsby internals so much as a recommendation to use the Stage 3 "Dynamic Import" form expressed here (you'll have to find on page): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import

anulman avatar Apr 26 '19 01:04 anulman

up

antoinerousseau avatar Sep 10 '19 21:09 antoinerousseau