1.0.3 • Published 5 years ago
@bigmogician/webpack-warning-plugin v1.0.3
webpack-warning-plugin
a filter of webpack output warnings.
environment
- webpack@^4.4.0
- typescript@^3.4.5
install
#use yarn
yarn add @bigmogician/webpack-warning-plugin -D
#use npm
npm install @bigmogician/webpack-warning-plugin --save-dev
usage
default example
webpack.config.js
const { WarningPlugin } = require("@bigmogician/webpack-warning-plugin");
module.exports = {
plugins: [
new WarningPlugin();
]
};
use match expression to filter warnings
- default:
[]
webpack.config.js
const { WarningPlugin } = require("@bigmogician/webpack-warning-plugin");
module.exports = {
plugins: [
new WarningPlugin({
rules: {
global: {
match: [
"not found",
/^module .*/gi,
(warning) => warning.error.message.length === 3
]
}
}
});
]
};
use your custom tsconfig.json
- default:
"tsconfig.json"
webpack.config.js
const { WarningPlugin } = require("@bigmogician/webpack-warning-plugin");
module.exports = {
plugins: [
new WarningPlugin({
options: {
tsconfig: "tsconfig.custom.json"
}
});
]
};
close the ignore filter for "vue exports not found" warnings
- default:
false
webpack.config.js
const { WarningPlugin } = require("@bigmogician/webpack-warning-plugin");
module.exports = {
plugins: [
new WarningPlugin({
rules: {
vue: {
ignoreModuleExportNotFoundForTs: true
}
}
});
]
};
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1-rc.1561371641615
5 years ago
1.0.1-rc.1561371399952
5 years ago
1.0.1
5 years ago
1.0.0-rc.1561363976746
5 years ago
1.0.0-rc.1561363744878
5 years ago