-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Don't support config in a ts type webpack config file? #31
Comments
It seems like |
This might be the simplest way to make it export both esm and cjs: https://thesametech.com/how-to-build-typescript-project/ |
After trying to make it work I have given up and found a workaround:
In other words, this doesn't need to be fixed here |
Thanks @mariusGundersen for the investigations! Even though I haven't managed to get a configuration with ESM and TS running locally, it's not a subject related to this project. There are several issues on this subject:
I'm going to close this issue as there is no link with the plugin imo. Thanks. |
Describe the bug
when i config the plugin in my "webpak.dev.ts" file, terminal report this error:
[webpack-cli] Failed to load '/xxx/svg-chunk-webpack-plugin/example/webpack.config.ts' config [webpack-cli] TypeError: Unknown file extension ".ts" for /xxx/svg-chunk-webpack-plugin/example/webpack.config.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:143:22) at async ModuleLoader.load (node:internal/modules/esm/loader:403:7) at async ModuleLoader.moduleProvider (node:internal/modules/esm/loader:285:45) at async link (node:internal/modules/esm/module_job:78:21) { code: 'ERR_UNKNOWN_FILE_EXTENSION' }
Steps to reproduce
try edit this project's example, will reproduce
Expected behavior
support config it in a ts type webpack config file
Screenshots and recordings
No response
Logs
No response
System Info
Severity
Annoyance
The text was updated successfully, but these errors were encountered: