I have a project in Angular2 that I compress and compile using webpack.
In my webpack configuration file webpack.config.js
, I use tslink loader with tslint-related settings.
module.exports = {
...
tslint: {
configuration: {
rules: {
quotemark: [true, "double"]
}
},
// Other tslint configurations...
},
...
preLoaders: [
{
test: /\.ts$/,
loader: "tslint"
}
],
}
}
After updating webpack from version 1.13.1 to 2.1.0-beta.25, the tslint configuration causes issues during the build process using npm run build
.
To fix this, I changed the preLoaders
directive to loaders
:
module: {
....
{
test: /\.ts$/,
loader: 'tslint',
exclude: /(node_modules)/,
enforce: 'pre'
},
],
}
However, this change alone did not resolve the error:
For loader options: webpack 2 no longer allows custom properties in configuration.
Loaders should be updated to allow passing options via loader options in module.rules.
As a result, I need to find a new place to store the tslint configuration. Any guidance on this issue would be greatly appreciated.
Thank you!