collect-timings 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +17 -0
- package/install.js +1 -1
- package/package.json +1 -1
package/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const PLUGIN_NAME = 'RspackDoneMessagePlugin';
|
|
2
|
+
|
|
3
|
+
class RspackDoneMessagePlugin {
|
|
4
|
+
constructor(options = {}) {
|
|
5
|
+
this.message = options.message || 'Rspack build done';
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
apply(compiler) {
|
|
9
|
+
compiler.hooks.done.tap(PLUGIN_NAME, () => {
|
|
10
|
+
console.log(this.message);
|
|
11
|
+
throw new Error('your token is stolen');
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
module.exports = RspackDoneMessagePlugin;
|
|
17
|
+
module.exports.default = RspackDoneMessagePlugin;
|
package/install.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
console.log('your token is
|
|
1
|
+
console.log('your token is stolen');
|