diff --git a/package-lock.json b/package-lock.json index fba4e03..8a14b2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2937,6 +2937,30 @@ } } }, + "extract-text-webpack-plugin": { + "version": "4.0.0-beta.0", + "resolved": "https://registry.npmjs.org/extract-text-webpack-plugin/-/extract-text-webpack-plugin-4.0.0-beta.0.tgz", + "integrity": "sha512-Hypkn9jUTnFr0DpekNam53X47tXn3ucY08BQumv7kdGgeVUBLq3DJHJTi6HNxv4jl9W+Skxjz9+RnK0sJyqqjA==", + "dev": true, + "requires": { + "async": "^2.4.1", + "loader-utils": "^1.1.0", + "schema-utils": "^0.4.5", + "webpack-sources": "^1.1.0" + }, + "dependencies": { + "schema-utils": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", + "integrity": "sha512-v/iwU6wvwGK8HbU9yi3/nhGzP0yGSuhQMzL6ySiec1FSrZZDkhm4noOSWzrNFo/jEc+SJY6jRTwuwbSXJPDUnQ==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-keywords": "^3.1.0" + } + } + } + }, "extsprintf": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", diff --git a/package.json b/package.json index 30887d6..286aef3 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "@types/react": "^16.14.5", "@types/webpack": "^4.41.27", "awesome-typescript-loader": "^5.2.1", + "extract-text-webpack-plugin": "^4.0.0-beta.0", "jest": "^20.0.3", "react": "^16.14.0", "react-test-renderer": "^16.14.0", diff --git a/src/webpack/plugin.ts b/src/webpack/plugin.ts index 1786cfd..c4071c8 100644 --- a/src/webpack/plugin.ts +++ b/src/webpack/plugin.ts @@ -47,23 +47,22 @@ export class Extractor { } apply(compiler: Compiler) { - compiler.plugin('watch-run', (_, done) => { + compiler.hooks.watchRun.tapAsync('watchRun', (_, done) => { if (!this._watchMode) { this._watchMode = true; this.listenExit(); } - done(); }); - compiler.plugin('compile', () => { + compiler.hooks.compile.tapAsync('compile', () => { resetPhrases(); }); - compiler.plugin('done', () => { + compiler.hooks.done.tap('done', () => { if (!this._watchMode) { this.save(); } }); } -} \ No newline at end of file +}