TypeScript -> JavaScript for browser: exports/require statementsTypescript importing exported class emits require(…) which produces browser errorsTypeScript: Avoid require statements in compiled JavaScriptHow do JavaScript closures work?What is the most efficient way to deep clone an object in JavaScript?How do I remove a property from a JavaScript object?Which equals operator (== vs ===) should be used in JavaScript comparisons?How do I include a JavaScript file in another JavaScript file?What does “use strict” do in JavaScript, and what is the reasoning behind it?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?For-each over an array in JavaScript?What is TypeScript and why would I use it in place of JavaScript?
How far did Gandalf and the Balrog drop from the bridge in Moria?
(A room / an office) where an artist works
How did Arecibo detect methane lakes on Titan, and image Saturn's rings?
Cases with long math equation
Why does the cable resistance jump from a low value to high value at a particular frequency?
How can God warn people of the upcoming rapture without disrupting society?
What kind of liquid can be seen 'leaking' from the upper surface of the wing of a Boeing 737-800?
Are there any other rule mechanics that could grant Thieves' Cant?
How to prevent criminal gangs from making/buying guns?
When did Bilbo and Frodo learn that Gandalf was a Maia?
Chunk + Enumerate a list of digits
What are the odds of rolling specific ability score totals in D&D?
"Mouth-breathing" as slang for stupidity
What would it take to get a message to another star?
Link for download latest Edubuntu
Human with super efficient metabolism
Why command hierarchy, if the chain of command is standing next to each other?
Scam? Phone call from "Department of Social Security" asking me to call back
How do I call a 6-digit Australian phone number with a US-based mobile phone?
Why aren’t there water shutoff valves for each room?
Crippling fear of hellfire &, damnation, please help?
Word for an event that will likely never happen again
Graphs for which a calculus student can reasonably compute the arclength
Is it possible to know the exact chord from the roman numerals
TypeScript -> JavaScript for browser: exports/require statements
Typescript importing exported class emits require(…) which produces browser errorsTypeScript: Avoid require statements in compiled JavaScriptHow do JavaScript closures work?What is the most efficient way to deep clone an object in JavaScript?How do I remove a property from a JavaScript object?Which equals operator (== vs ===) should be used in JavaScript comparisons?How do I include a JavaScript file in another JavaScript file?What does “use strict” do in JavaScript, and what is the reasoning behind it?How to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?For-each over an array in JavaScript?What is TypeScript and why would I use it in place of JavaScript?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to switch from JavaScript to TypeScript for our web app's scripts. However, when generating the JavaScript it always puts the following lines on top of the script:
"use strict";
exports.__esModule = true;
var $ = require("jquery");
I receive browser errors for this. How to prevent TypeScript from doing so?
I read TypeScript: Avoid require statements in compiled JavaScript but it can't be the answer to switch to "any", this forfeits the whole TypeScript idea.
I also read Typescript importing exported class emits require(...) which produces browser errors but this still generates the <reference...
stuff into the JS file, which is also not what I want.
How to create "clean" JS files?
My tsconfig.json looks like this:
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5"
,
"compileOnSave": true
My gulp call is:
var ts = require('gulp-typescript');
...
var tsProject = ts.createProject("tsconfig.json");
...
gulp.task("ts", function ()
return gulp.src(tsInputFiles)
.pipe(tsProject())
.js
.pipe(gulp.dest("wwwroot/js"));
);
javascript typescript
|
show 4 more comments
I want to switch from JavaScript to TypeScript for our web app's scripts. However, when generating the JavaScript it always puts the following lines on top of the script:
"use strict";
exports.__esModule = true;
var $ = require("jquery");
I receive browser errors for this. How to prevent TypeScript from doing so?
I read TypeScript: Avoid require statements in compiled JavaScript but it can't be the answer to switch to "any", this forfeits the whole TypeScript idea.
I also read Typescript importing exported class emits require(...) which produces browser errors but this still generates the <reference...
stuff into the JS file, which is also not what I want.
How to create "clean" JS files?
My tsconfig.json looks like this:
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5"
,
"compileOnSave": true
My gulp call is:
var ts = require('gulp-typescript');
...
var tsProject = ts.createProject("tsconfig.json");
...
gulp.task("ts", function ()
return gulp.src(tsInputFiles)
.pipe(tsProject())
.js
.pipe(gulp.dest("wwwroot/js"));
);
javascript typescript
Show yourtsconfig.json
file, are you using webpack?
– hoangdv
Mar 27 at 11:03
I've added thetsconfig.json
. No I'm using a gulp pipeline.
– D.R.
Mar 27 at 11:05
I think, you could try addbabel
to your gulp pipeline.
– hoangdv
Mar 27 at 11:39
I added babel to my pipeline after.js
and beforegulp.dest
, but it didn't help. What exactly should babel do?
– D.R.
Mar 27 at 11:55
"I receive browser errors for this." Could you tell us what are these ?
– Kewin Dousse
Mar 27 at 12:11
|
show 4 more comments
I want to switch from JavaScript to TypeScript for our web app's scripts. However, when generating the JavaScript it always puts the following lines on top of the script:
"use strict";
exports.__esModule = true;
var $ = require("jquery");
I receive browser errors for this. How to prevent TypeScript from doing so?
I read TypeScript: Avoid require statements in compiled JavaScript but it can't be the answer to switch to "any", this forfeits the whole TypeScript idea.
I also read Typescript importing exported class emits require(...) which produces browser errors but this still generates the <reference...
stuff into the JS file, which is also not what I want.
How to create "clean" JS files?
My tsconfig.json looks like this:
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5"
,
"compileOnSave": true
My gulp call is:
var ts = require('gulp-typescript');
...
var tsProject = ts.createProject("tsconfig.json");
...
gulp.task("ts", function ()
return gulp.src(tsInputFiles)
.pipe(tsProject())
.js
.pipe(gulp.dest("wwwroot/js"));
);
javascript typescript
I want to switch from JavaScript to TypeScript for our web app's scripts. However, when generating the JavaScript it always puts the following lines on top of the script:
"use strict";
exports.__esModule = true;
var $ = require("jquery");
I receive browser errors for this. How to prevent TypeScript from doing so?
I read TypeScript: Avoid require statements in compiled JavaScript but it can't be the answer to switch to "any", this forfeits the whole TypeScript idea.
I also read Typescript importing exported class emits require(...) which produces browser errors but this still generates the <reference...
stuff into the JS file, which is also not what I want.
How to create "clean" JS files?
My tsconfig.json looks like this:
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5"
,
"compileOnSave": true
My gulp call is:
var ts = require('gulp-typescript');
...
var tsProject = ts.createProject("tsconfig.json");
...
gulp.task("ts", function ()
return gulp.src(tsInputFiles)
.pipe(tsProject())
.js
.pipe(gulp.dest("wwwroot/js"));
);
javascript typescript
javascript typescript
edited Mar 27 at 11:05
D.R.
asked Mar 27 at 10:58
D.R.D.R.
9,83215 gold badges52 silver badges127 bronze badges
9,83215 gold badges52 silver badges127 bronze badges
Show yourtsconfig.json
file, are you using webpack?
– hoangdv
Mar 27 at 11:03
I've added thetsconfig.json
. No I'm using a gulp pipeline.
– D.R.
Mar 27 at 11:05
I think, you could try addbabel
to your gulp pipeline.
– hoangdv
Mar 27 at 11:39
I added babel to my pipeline after.js
and beforegulp.dest
, but it didn't help. What exactly should babel do?
– D.R.
Mar 27 at 11:55
"I receive browser errors for this." Could you tell us what are these ?
– Kewin Dousse
Mar 27 at 12:11
|
show 4 more comments
Show yourtsconfig.json
file, are you using webpack?
– hoangdv
Mar 27 at 11:03
I've added thetsconfig.json
. No I'm using a gulp pipeline.
– D.R.
Mar 27 at 11:05
I think, you could try addbabel
to your gulp pipeline.
– hoangdv
Mar 27 at 11:39
I added babel to my pipeline after.js
and beforegulp.dest
, but it didn't help. What exactly should babel do?
– D.R.
Mar 27 at 11:55
"I receive browser errors for this." Could you tell us what are these ?
– Kewin Dousse
Mar 27 at 12:11
Show your
tsconfig.json
file, are you using webpack?– hoangdv
Mar 27 at 11:03
Show your
tsconfig.json
file, are you using webpack?– hoangdv
Mar 27 at 11:03
I've added the
tsconfig.json
. No I'm using a gulp pipeline.– D.R.
Mar 27 at 11:05
I've added the
tsconfig.json
. No I'm using a gulp pipeline.– D.R.
Mar 27 at 11:05
I think, you could try add
babel
to your gulp pipeline.– hoangdv
Mar 27 at 11:39
I think, you could try add
babel
to your gulp pipeline.– hoangdv
Mar 27 at 11:39
I added babel to my pipeline after
.js
and before gulp.dest
, but it didn't help. What exactly should babel do?– D.R.
Mar 27 at 11:55
I added babel to my pipeline after
.js
and before gulp.dest
, but it didn't help. What exactly should babel do?– D.R.
Mar 27 at 11:55
"I receive browser errors for this." Could you tell us what are these ?
– Kewin Dousse
Mar 27 at 12:11
"I receive browser errors for this." Could you tell us what are these ?
– Kewin Dousse
Mar 27 at 12:11
|
show 4 more comments
2 Answers
2
active
oldest
votes
Just drop the module loading in the beginning of your typescript file, if you do not want to load any modules?
file1.ts:
$(function ()
);
If you try to compile this, you'll get an error:
file1.ts(2,1): error TS2581: Cannot find name '$'. Do you need to
install type definitions for jQuery? Try `npm i @types/jquery` and
then add `jquery` to the types field in your tsconfig.
Run npm as told above (npm init
first, if npm has not been initialized in the directory).
Then add typeRoots
and types
to tsconfig:
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"typeRoots": [ "node_modules/types" ],
"types": [ "jquery" ]
,
"compileOnSave": true
After that, the compiling works, and you still have the strong typing in place (jquery types applied in compilation).
This seems to work, however, how to extend an interface from a given type schema? The compiler always fails with "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."
– D.R.
Mar 27 at 14:52
add a comment |
Browsers don't support JavaScript modules, so you'll need to tell the TypeScript compiler that you're trying to compile code that will be run on a browser. I don't know what the rest of your project looks like, but in your configuration, try adding "module": "es2015"
or "module": "system"
to your configuration, while also adding an outFile
defining where you want to file to be generated :
in your tsconfig file :
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"module": "es2015",
"oufFile": "script.js",
,
"compileOnSave": true
That'll generateimport
statements in JS files.
– raina77ow
Mar 27 at 12:24
Unfortunately, neither es2015 nor system helped.
– D.R.
Mar 27 at 12:34
Indeed, if you're not using any bundler and don't want multiple files, then I guess you should use the outFile option, which "concatenates" (in short) the output in a single file, after resolving the module imports. I edited my answer to reflect this.
– Kewin Dousse
Mar 27 at 12:39
Concatenating still creates the lines in question :(
– D.R.
Mar 27 at 14:52
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375555%2ftypescript-javascript-for-browser-exports-require-statements%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
Just drop the module loading in the beginning of your typescript file, if you do not want to load any modules?
file1.ts:
$(function ()
);
If you try to compile this, you'll get an error:
file1.ts(2,1): error TS2581: Cannot find name '$'. Do you need to
install type definitions for jQuery? Try `npm i @types/jquery` and
then add `jquery` to the types field in your tsconfig.
Run npm as told above (npm init
first, if npm has not been initialized in the directory).
Then add typeRoots
and types
to tsconfig:
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"typeRoots": [ "node_modules/types" ],
"types": [ "jquery" ]
,
"compileOnSave": true
After that, the compiling works, and you still have the strong typing in place (jquery types applied in compilation).
This seems to work, however, how to extend an interface from a given type schema? The compiler always fails with "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."
– D.R.
Mar 27 at 14:52
add a comment |
Just drop the module loading in the beginning of your typescript file, if you do not want to load any modules?
file1.ts:
$(function ()
);
If you try to compile this, you'll get an error:
file1.ts(2,1): error TS2581: Cannot find name '$'. Do you need to
install type definitions for jQuery? Try `npm i @types/jquery` and
then add `jquery` to the types field in your tsconfig.
Run npm as told above (npm init
first, if npm has not been initialized in the directory).
Then add typeRoots
and types
to tsconfig:
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"typeRoots": [ "node_modules/types" ],
"types": [ "jquery" ]
,
"compileOnSave": true
After that, the compiling works, and you still have the strong typing in place (jquery types applied in compilation).
This seems to work, however, how to extend an interface from a given type schema? The compiler always fails with "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."
– D.R.
Mar 27 at 14:52
add a comment |
Just drop the module loading in the beginning of your typescript file, if you do not want to load any modules?
file1.ts:
$(function ()
);
If you try to compile this, you'll get an error:
file1.ts(2,1): error TS2581: Cannot find name '$'. Do you need to
install type definitions for jQuery? Try `npm i @types/jquery` and
then add `jquery` to the types field in your tsconfig.
Run npm as told above (npm init
first, if npm has not been initialized in the directory).
Then add typeRoots
and types
to tsconfig:
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"typeRoots": [ "node_modules/types" ],
"types": [ "jquery" ]
,
"compileOnSave": true
After that, the compiling works, and you still have the strong typing in place (jquery types applied in compilation).
Just drop the module loading in the beginning of your typescript file, if you do not want to load any modules?
file1.ts:
$(function ()
);
If you try to compile this, you'll get an error:
file1.ts(2,1): error TS2581: Cannot find name '$'. Do you need to
install type definitions for jQuery? Try `npm i @types/jquery` and
then add `jquery` to the types field in your tsconfig.
Run npm as told above (npm init
first, if npm has not been initialized in the directory).
Then add typeRoots
and types
to tsconfig:
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"typeRoots": [ "node_modules/types" ],
"types": [ "jquery" ]
,
"compileOnSave": true
After that, the compiling works, and you still have the strong typing in place (jquery types applied in compilation).
edited Mar 27 at 12:42
answered Mar 27 at 12:36
masamasa
2,1783 gold badges14 silver badges24 bronze badges
2,1783 gold badges14 silver badges24 bronze badges
This seems to work, however, how to extend an interface from a given type schema? The compiler always fails with "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."
– D.R.
Mar 27 at 14:52
add a comment |
This seems to work, however, how to extend an interface from a given type schema? The compiler always fails with "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."
– D.R.
Mar 27 at 14:52
This seems to work, however, how to extend an interface from a given type schema? The compiler always fails with "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."
– D.R.
Mar 27 at 14:52
This seems to work, however, how to extend an interface from a given type schema? The compiler always fails with "Augmentations for the global scope can only be directly nested in external modules or ambient module declarations."
– D.R.
Mar 27 at 14:52
add a comment |
Browsers don't support JavaScript modules, so you'll need to tell the TypeScript compiler that you're trying to compile code that will be run on a browser. I don't know what the rest of your project looks like, but in your configuration, try adding "module": "es2015"
or "module": "system"
to your configuration, while also adding an outFile
defining where you want to file to be generated :
in your tsconfig file :
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"module": "es2015",
"oufFile": "script.js",
,
"compileOnSave": true
That'll generateimport
statements in JS files.
– raina77ow
Mar 27 at 12:24
Unfortunately, neither es2015 nor system helped.
– D.R.
Mar 27 at 12:34
Indeed, if you're not using any bundler and don't want multiple files, then I guess you should use the outFile option, which "concatenates" (in short) the output in a single file, after resolving the module imports. I edited my answer to reflect this.
– Kewin Dousse
Mar 27 at 12:39
Concatenating still creates the lines in question :(
– D.R.
Mar 27 at 14:52
add a comment |
Browsers don't support JavaScript modules, so you'll need to tell the TypeScript compiler that you're trying to compile code that will be run on a browser. I don't know what the rest of your project looks like, but in your configuration, try adding "module": "es2015"
or "module": "system"
to your configuration, while also adding an outFile
defining where you want to file to be generated :
in your tsconfig file :
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"module": "es2015",
"oufFile": "script.js",
,
"compileOnSave": true
That'll generateimport
statements in JS files.
– raina77ow
Mar 27 at 12:24
Unfortunately, neither es2015 nor system helped.
– D.R.
Mar 27 at 12:34
Indeed, if you're not using any bundler and don't want multiple files, then I guess you should use the outFile option, which "concatenates" (in short) the output in a single file, after resolving the module imports. I edited my answer to reflect this.
– Kewin Dousse
Mar 27 at 12:39
Concatenating still creates the lines in question :(
– D.R.
Mar 27 at 14:52
add a comment |
Browsers don't support JavaScript modules, so you'll need to tell the TypeScript compiler that you're trying to compile code that will be run on a browser. I don't know what the rest of your project looks like, but in your configuration, try adding "module": "es2015"
or "module": "system"
to your configuration, while also adding an outFile
defining where you want to file to be generated :
in your tsconfig file :
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"module": "es2015",
"oufFile": "script.js",
,
"compileOnSave": true
Browsers don't support JavaScript modules, so you'll need to tell the TypeScript compiler that you're trying to compile code that will be run on a browser. I don't know what the rest of your project looks like, but in your configuration, try adding "module": "es2015"
or "module": "system"
to your configuration, while also adding an outFile
defining where you want to file to be generated :
in your tsconfig file :
"compilerOptions":
"noImplicitAny": true,
"noEmitOnError": true,
"sourceMap": true,
"target": "es5",
"module": "es2015",
"oufFile": "script.js",
,
"compileOnSave": true
edited Mar 27 at 12:38
answered Mar 27 at 12:19
Kewin DousseKewin Dousse
2,2701 gold badge17 silver badges38 bronze badges
2,2701 gold badge17 silver badges38 bronze badges
That'll generateimport
statements in JS files.
– raina77ow
Mar 27 at 12:24
Unfortunately, neither es2015 nor system helped.
– D.R.
Mar 27 at 12:34
Indeed, if you're not using any bundler and don't want multiple files, then I guess you should use the outFile option, which "concatenates" (in short) the output in a single file, after resolving the module imports. I edited my answer to reflect this.
– Kewin Dousse
Mar 27 at 12:39
Concatenating still creates the lines in question :(
– D.R.
Mar 27 at 14:52
add a comment |
That'll generateimport
statements in JS files.
– raina77ow
Mar 27 at 12:24
Unfortunately, neither es2015 nor system helped.
– D.R.
Mar 27 at 12:34
Indeed, if you're not using any bundler and don't want multiple files, then I guess you should use the outFile option, which "concatenates" (in short) the output in a single file, after resolving the module imports. I edited my answer to reflect this.
– Kewin Dousse
Mar 27 at 12:39
Concatenating still creates the lines in question :(
– D.R.
Mar 27 at 14:52
That'll generate
import
statements in JS files.– raina77ow
Mar 27 at 12:24
That'll generate
import
statements in JS files.– raina77ow
Mar 27 at 12:24
Unfortunately, neither es2015 nor system helped.
– D.R.
Mar 27 at 12:34
Unfortunately, neither es2015 nor system helped.
– D.R.
Mar 27 at 12:34
Indeed, if you're not using any bundler and don't want multiple files, then I guess you should use the outFile option, which "concatenates" (in short) the output in a single file, after resolving the module imports. I edited my answer to reflect this.
– Kewin Dousse
Mar 27 at 12:39
Indeed, if you're not using any bundler and don't want multiple files, then I guess you should use the outFile option, which "concatenates" (in short) the output in a single file, after resolving the module imports. I edited my answer to reflect this.
– Kewin Dousse
Mar 27 at 12:39
Concatenating still creates the lines in question :(
– D.R.
Mar 27 at 14:52
Concatenating still creates the lines in question :(
– D.R.
Mar 27 at 14:52
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55375555%2ftypescript-javascript-for-browser-exports-require-statements%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Show your
tsconfig.json
file, are you using webpack?– hoangdv
Mar 27 at 11:03
I've added the
tsconfig.json
. No I'm using a gulp pipeline.– D.R.
Mar 27 at 11:05
I think, you could try add
babel
to your gulp pipeline.– hoangdv
Mar 27 at 11:39
I added babel to my pipeline after
.js
and beforegulp.dest
, but it didn't help. What exactly should babel do?– D.R.
Mar 27 at 11:55
"I receive browser errors for this." Could you tell us what are these ?
– Kewin Dousse
Mar 27 at 12:11