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
I'm trying to bundle helmet with rollup-plugin-typescript2, but I keep getting this error, is it related directly to helmet or is this a ts/rpt2 issue?
[!] (plugin rpt2) RollupError: Unexpected token (Note that you need plugins to import files that are not JavaScript)
../../node_modules/helmet/index.d.cts (3:5)
1: import {IncomingMessage, ServerResponse} from "http"
2:
3: type ContentSecurityPolicyDirectiveValueFunction = (req: IncomingMessage, res: ServerResponse) => string
^
4: type ContentSecurityPolicyDirectiveValue = string | ContentSecurityPolicyDirectiveValueFunction
5: interface ContentSecurityPolicyOptions {
at error (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:279:30)
at Module.error (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:13947:16)
at Module.tryParse (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:14658:25)
at Module.setSource (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:14260:39)
at ModuleLoader.addModuleSource (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:24225:20)
[!] (plugin rpt2) RollupError: Unexpected token (Note that you need plugins to import files that are not JavaScript)
../../node_modules/helmet/index.d.mts (3:5)
1: import {IncomingMessage, ServerResponse} from "http"
2:
3: type ContentSecurityPolicyDirectiveValueFunction = (req: IncomingMessage, res: ServerResponse) => string
^
4: type ContentSecurityPolicyDirectiveValue = string | ContentSecurityPolicyDirectiveValueFunction
5: interface ContentSecurityPolicyOptions {
at error (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:279:30)
at Module.error (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:13947:16)
at Module.tryParse (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:14668:25)
at Module.setSource (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:14270:39)
at ModuleLoader.addModuleSource (/home/alexander/Workspace/company/internal/devplatform-server-api/node_modules/rollup/dist/shared/rollup.js:24266:20)
I'm not sure, but I assume this is an issue with the Rollup plugin. Helmet's type definitions look correct to me, and seem to be working well for others.
I'm going to close this issue, but let me know if that's wrong and I can reopen.
I'm trying to bundle
helmet
withrollup-plugin-typescript2
, but I keep getting this error, is it related directly tohelmet
or is this ats
/rpt2
issue?The original issue is here: ezolenko/rollup-plugin-typescript2#446
The text was updated successfully, but these errors were encountered: