You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried the pass the ntypescript compiler in the options but I am getting an error.
Using it to write jsx code in typerscript. That means the files have the extension .tsx.
Is this supported?
popup.tsx:2
import * as $ from 'jquery';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
Browserify config:
{
entries: './Source/popup.tsx',
dest: './Package',
extensions: ['.tsx', '.ts'],
outputName: 'popup.bundle.js',
// list of externally available modules to exclude from the bundle
external: libsArray
}
Tsify plugin options:
.plugin('tsify', {
noImplicitAny: true,
typescript: require("ntypescript"),
declarationFiles: true,
noExternalResolve: false,
sortOutput: true,
jsx: "react",
module: 'commonjs'
})
Is there something wrong in the configuration?
The text was updated successfully, but these errors were encountered:
That error means that popup.tsx isn't being transformed before Browserify tries to bundle it. There's a known issue which can cause this (browserify/browserify#1131, also discussed in #60) but from that config alone it doesn't look like this is the same case... I can take a quick look, but a minimal repro would be helpful!
Tried the pass the ntypescript compiler in the options but I am getting an error.
Using it to write jsx code in typerscript. That means the files have the extension .tsx.
Is this supported?
popup.tsx:2
import * as $ from 'jquery';
^
ParseError: 'import' and 'export' may appear only with 'sourceType: module'
Browserify config:
{
entries: './Source/popup.tsx',
dest: './Package',
extensions: ['.tsx', '.ts'],
outputName: 'popup.bundle.js',
// list of externally available modules to exclude from the bundle
external: libsArray
}
Tsify plugin options:
.plugin('tsify', {
noImplicitAny: true,
typescript: require("ntypescript"),
declarationFiles: true,
noExternalResolve: false,
sortOutput: true,
jsx: "react",
module: 'commonjs'
})
Is there something wrong in the configuration?
The text was updated successfully, but these errors were encountered: