Open duncanbeevers opened 5 years ago
This may no longer be an issue. When I use the following invalid config:
{
loader: 'swc-loader',
options: {
module: {
type: 'foo',
},
},
}
I get the error:
Module build failed (from ../node_modules/swc-loader/src/index.js):
Error: Failed to deserialize swc::config::Options from json string (`{"module":{"type":"foo"},"filename":"/path/to/myfile.js","sourceMaps":true,"sourceFileName":"/path/to/myfile.js"}`)
Caused by:
unknown variant `foo`, expected one of `commonjs`, `umd`, `amd`, `es6` at line 1 column 175
If the config supplied to swc-loader is invalid, instead of running with defaults swc should warn the operator and halt compilation.