mirror of
https://github.com/remotely-save/remotely-save.git
synced 2024-06-07 21:10:45 +00:00
inject env var in webpack
This commit is contained in:
parent
2930fe5350
commit
ccd3b49b4b
@ -1,7 +1,10 @@
|
||||
require("dotenv").config();
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
const DEFAULT_DROPBOX_APP_KEY = process.env.DROPBOX_APP_KEY || "";
|
||||
|
||||
module.exports = {
|
||||
entry: "./src/main.ts",
|
||||
target: "web",
|
||||
@ -11,6 +14,9 @@ module.exports = {
|
||||
libraryTarget: "commonjs",
|
||||
},
|
||||
plugins: [
|
||||
new webpack.DefinePlugin({
|
||||
"process.env.DEFAULT_DROPBOX_APP_KEY": `"${DEFAULT_DROPBOX_APP_KEY}"`,
|
||||
}),
|
||||
// Work around for Buffer is undefined:
|
||||
// https://github.com/webpack/changelog-v5/issues/10
|
||||
new webpack.ProvidePlugin({
|
||||
|
Loading…
Reference in New Issue
Block a user