jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/378647 )
Change subject: PoC: Chore: enable Preact debug mode and DevTools integration ...................................................................... PoC: Chore: enable Preact debug mode and DevTools integration For development builds, enable Preact debug mode, Chrome DevTools integration, and runtime error checking. https://github.com/developit/preact#debug-mode https://github.com/facebook/react-devtools Change-Id: I47c735a943a2c09fd7d61bb344253bcfa2acc8f5 --- M webpack.config.ts 1 file changed, 7 insertions(+), 2 deletions(-) Approvals: Jhernandez: Looks good to me, approved jenkins-bot: Verified diff --git a/webpack.config.ts b/webpack.config.ts index f964ed6..ddd5d98 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -35,6 +35,8 @@ warnings: true }; +const PREACT = PRODUCTION ? "preact" : "preact/debug"; + const configuration: webpack.Configuration = { // Bundled outputs and their source inputs. For each entry, the source input // and any dependencies are compiled together into one chunk file output @@ -62,7 +64,7 @@ // Client package dependencies (these should be a subset of package.json's // `dependencies`). This chunk changes when one of the specified // dependencies changes. - vendor: ["history", "isomorphic-unfetch", "path-to-regexp", "preact"] + vendor: ["history", "isomorphic-unfetch", "path-to-regexp", PREACT] }, stats: STATS, @@ -184,9 +186,12 @@ // https://medium.com/webpack/predictable-long-term-caching-with-webpack-d3eee1d3fa31. configuration.plugins = [ new webpack.DefinePlugin({ - "process.env.NODE_ENV": JSON.stringify(process.env.NODE_ENV), + "process.env": { + NODE_ENV: JSON.stringify(PRODUCTION ? "production" : "development") + }, VERSION: JSON.stringify(pkg.version) }), + // Reference modules by name instead of by chunk ID so hashes don't change // when new files are added. For example, // `"./node_modules/preact/dist/preact.esm.js"` instead of `18`. -- To view, visit https://gerrit.wikimedia.org/r/378647 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I47c735a943a2c09fd7d61bb344253bcfa2acc8f5 Gerrit-PatchSet: 3 Gerrit-Project: marvin Gerrit-Branch: master Gerrit-Owner: Niedzielski <[email protected]> Gerrit-Reviewer: Jhernandez <[email protected]> Gerrit-Reviewer: Sniedzielski <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
