Compare commits

...
2 Commits
Author SHA1 Message Date
fyears 789d07261e 0.1.10 2021-12-01 10:11:20 +08:00
fyears ccd3b49b4b inject env var in webpack 2021-12-01 10:10:39 +08:00
4 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
{ {
"id": "obsidian-remotely-save", "id": "obsidian-remotely-save",
"name": "Remotely Save", "name": "Remotely Save",
"version": "0.1.9", "version": "0.1.10",
"minAppVersion": "0.12.15", "minAppVersion": "0.12.15",
"description": "Yet another unofficial plugin allowing users to sync notes between local device and the cloud service.", "description": "Yet another unofficial plugin allowing users to sync notes between local device and the cloud service.",
"author": "fyears", "author": "fyears",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "obsidian-remotely-save", "name": "obsidian-remotely-save",
"version": "0.1.9", "version": "0.1.10",
"description": "This is yet another sync plugin for Obsidian app.", "description": "This is yet another sync plugin for Obsidian app.",
"scripts": { "scripts": {
"dev": "node esbuild.config.mjs", "dev": "node esbuild.config.mjs",
+1 -1
View File
@@ -1,3 +1,3 @@
{ {
"0.1.9": "0.12.15" "0.1.10": "0.12.15"
} }
+6
View File
@@ -1,7 +1,10 @@
require("dotenv").config();
const path = require("path"); const path = require("path");
const webpack = require("webpack"); const webpack = require("webpack");
const TerserPlugin = require("terser-webpack-plugin"); const TerserPlugin = require("terser-webpack-plugin");
const DEFAULT_DROPBOX_APP_KEY = process.env.DROPBOX_APP_KEY || "";
module.exports = { module.exports = {
entry: "./src/main.ts", entry: "./src/main.ts",
target: "web", target: "web",
@@ -11,6 +14,9 @@ module.exports = {
libraryTarget: "commonjs", libraryTarget: "commonjs",
}, },
plugins: [ plugins: [
new webpack.DefinePlugin({
"process.env.DEFAULT_DROPBOX_APP_KEY": `"${DEFAULT_DROPBOX_APP_KEY}"`,
}),
// Work around for Buffer is undefined: // Work around for Buffer is undefined:
// https://github.com/webpack/changelog-v5/issues/10 // https://github.com/webpack/changelog-v5/issues/10
new webpack.ProvidePlugin({ new webpack.ProvidePlugin({