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

Conversation

@ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Mar 1, 2021

When using an import() with a variable argument (as opposed to a string), precint returns [undefined] instead of []. This leads the following function to fail:

const isNextOnNetlify = function (dependency) {
return basename(dependency, '.js') === 'renderNextPage'
}

This PR filters out undefined. This ensures bundling works.

This only applies to the ZISI bundler. esbuild handles this case correctly.

This also adds tests for both ZISI and esbuild bundlers.

@ehmicky ehmicky added the type: bug code to address defects in shipped code label Mar 1, 2021
@ehmicky ehmicky requested a review from eduardoboucas March 1, 2021 13:50
@ehmicky ehmicky self-assigned this Mar 1, 2021
@ehmicky ehmicky merged commit f91c49d into master Mar 1, 2021
@ehmicky ehmicky deleted the bug/fix-dynamic-import branch March 1, 2021 14:22
Skn0tt pushed a commit to netlify/build that referenced this pull request May 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

type: bug code to address defects in shipped code

4 participants