-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.plugins.ts
More file actions
24 lines (19 loc) · 853 Bytes
/
webpack.plugins.ts
File metadata and controls
24 lines (19 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import type IForkTsCheckerWebpackPlugin from "fork-ts-checker-webpack-plugin";
import webpack from "webpack";
import dotenv from "dotenv";
// eslint-disable-next-line @typescript-eslint/no-var-requires
const ForkTsCheckerWebpackPlugin: typeof IForkTsCheckerWebpackPlugin = require("fork-ts-checker-webpack-plugin");
export const plugins = [
new ForkTsCheckerWebpackPlugin({
logger: "webpack-infrastructure",
}),
// or DefinePlugin
new webpack.DefinePlugin({
"process.env.VERSION": JSON.stringify(process.env.VERSION),
"process.env.WOO_HOO": JSON.stringify(process.env.WOO_HOO),
"process.env.CLARIFAI_PAT": JSON.stringify(process.env.CLARIFAI_PAT),
...dotenv.config().parsed, // --> add this line works
}),
];
// https://github.com/motdotla/dotenv/issues/139 - solution
// https://github.com/electron/forge/issues/3558