Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using webpack config written in TypeScript #109

Open
subbotinb opened this issue May 13, 2024 · 0 comments
Open

Error when using webpack config written in TypeScript #109

subbotinb opened this issue May 13, 2024 · 0 comments

Comments

@subbotinb
Copy link

I want to use a webpack config written in TypeScript in my project, but I get an error message if I remove UserscriptPlugin from the configuration, then everything works.

What could be the problem?

[webpack-cli] Failed to load 'C:\***\webpack.config.ts' config
[webpack-cli] TypeError: Unknown file extension ".ts" for C:\***\webpack.config.base.ts
     at Object.getFileProtocolModuleFormat [as file:] (node:internal/modules/esm/get_format:160:9)
     at defaultGetFormat (node:internal/modules/esm/get_format:203:36)
     at defaultLoad (node:internal/modules/esm/load:141:22)
     at async ModuleLoader.load (node:internal/modules/esm/loader:409:7)
     at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:291:45)
     at async link (node:internal/modules/esm/module_job:76:21) {
   code: 'ERR_UNKNOWN_FILE_EXTENSION'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant