Compile in JS-only mode for files ending in ".js"
This commit is contained in:
parent
300c4046f8
commit
25c701cd4e
|
@ -160,7 +160,7 @@ const boot: tslib.server.PluginModuleFactory = ({ typescript: ts }) => {
|
||||||
const { text: expandedText, targetToSourceMap, sourceToTargetMap } = compile({
|
const { text: expandedText, targetToSourceMap, sourceToTargetMap } = compile({
|
||||||
source,
|
source,
|
||||||
name,
|
name,
|
||||||
typescript: true,
|
typescript: !name.toLowerCase().endsWith('.js'),
|
||||||
emitError: (message, start, end) => {
|
emitError: (message, start, end) => {
|
||||||
console.error(`${Syntax.formatPos(start)}-${Syntax.formatPos(end)}: ${message}`);
|
console.error(`${Syntax.formatPos(start)}-${Syntax.formatPos(end)}: ${message}`);
|
||||||
diagnostics.push({ message, start, end });
|
diagnostics.push({ message, start, end });
|
||||||
|
|
Loading…
Reference in New Issue