After I have upgraded to webpack beta 23 I have started getting an error to do with the extensions property when running webpack:
my extensions were: extensions: ['','.ts', '.js'],
If I remove the blank extension option the configuration error goes away but now none of my modules will load as they are all loaded without an extension. Is there some specific way I should be specifying blank extension in this new version?
I think I have found the right configuration
I am not sure that this is correct but after a series of trial an error I have tried using the * symbol instead of an empty string. This seems to have fixed the problem.So final syntax for the extensions attribute:
extensions: ['*', 'js', 'ts']
Hope this is the intended way to do it
Just to confirm your findings.
The empty string is deprecated: https://github.com/webpack/webpack/issues/3043
extensions: ['.ts', '.js']
will resolve all of your .ts and .js files, not more.
extensions: ['*', '.ts', '.js']
will resolve all extensions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With