Skip to content
This repository has been archived by the owner on Nov 5, 2021. It is now read-only.

Allow error messages to contain references to require in their strings #59

Closed
wants to merge 2 commits into from

Conversation

orta
Copy link
Contributor

@orta orta commented Apr 7, 2020

When running with nightly TS builds:

> npm run import-typescript {"cwd":"monaco-typescript"}

Found new require() calls on the following lines. These should be removed to avoid breaking webpack builds.

        _0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import: diag(2616, ts.DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_a_default_import_2616", "'{0}' can only be imported by using 'import {1} = require({2})' or a default import."),

        _0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import: diag(2617, ts.DiagnosticCategory.Error, "_0_can_only_be_imported_by_using_import_1_require_2_or_by_turning_on_the_esModuleInterop_flag_and_us_2617", "'{0}' can only be imported by using 'import {1} = require({2})' or by turning on the 'esModuleInterop' flag and using a default import."),

I think it's safe to assume that the require inside a string won't confuse webpack, open to other ideas if not 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant