summaryrefslogtreecommitdiff
path: root/webpack/plugins/const.ts
diff options
context:
space:
mode:
Diffstat (limited to 'webpack/plugins/const.ts')
-rw-r--r--webpack/plugins/const.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/webpack/plugins/const.ts b/webpack/plugins/const.ts
new file mode 100644
index 0000000000..ccfcb45260
--- /dev/null
+++ b/webpack/plugins/const.ts
@@ -0,0 +1,13 @@
+/**
+ * Constant Replacer
+ */
+
+import * as webpack from 'webpack';
+
+import version from '../../src/version';
+const constants = require('../../src/const.json');
+
+export default () => new webpack.DefinePlugin({
+ VERSION: JSON.stringify(version),
+ THEME_COLOR: JSON.stringify(constants.themeColor)
+});