fix: inline ENV variables when building excalidraw package (#4311)

This commit is contained in:
David Luzar
2021-11-24 16:25:19 +01:00
committed by GitHub
parent a132f154cb
commit 96b31ecbce
9 changed files with 51 additions and 1 deletions
@@ -1,6 +1,7 @@
const path = require("path");
const webpack = require("webpack");
const autoprefixer = require("autoprefixer");
const { parseEnvVariables } = require("./env");
module.exports = {
mode: "development",
@@ -76,7 +77,14 @@ module.exports = {
},
},
},
plugins: [new webpack.EvalSourceMapDevToolPlugin({ exclude: /vendor/ })],
plugins: [
new webpack.EvalSourceMapDevToolPlugin({ exclude: /vendor/ }),
new webpack.DefinePlugin({
"process.env": parseEnvVariables(
path.resolve(__dirname, "../../../.env.development"),
),
}),
],
externals: {
react: {
root: "React",