We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71dd334 commit 028dbd7Copy full SHA for 028dbd7
1 file changed
src/node_contextify.cc
@@ -1622,7 +1622,7 @@ MaybeLocal<Object> ContextifyFunction::CompileFunctionAndCacheResult(
1622
// While top-level `await` is not permitted in CommonJS, it returns the same
1623
// error message as when `await` is used in a sync function, so we don't use it
1624
// as a disambiguation.
1625
-static const std::vector<std::string_view> esm_syntax_error_messages = {
+static const auto esm_syntax_error_messages = std::to_array<std::string_view>({
1626
"Cannot use import statement outside a module", // `import` statements
1627
"Unexpected token 'export'", // `export` statements
1628
"Cannot use 'import.meta' outside a module"}; // `import.meta` references
0 commit comments