Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demos/angular-supabase-todolist/extra-webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ module.exports = (config, options, targetOptions) => {
...config.plugins,
new webpack.DefinePlugin({
// Embed environment variables starting with `WEBPACK_PUBLIC_`
'process.env': JSON.stringify(
env: JSON.stringify(
Object.fromEntries(Object.entries(process.env).filter(([key]) => key.startsWith('WEBPACK_PUBLIC_')))
)
})
Expand Down
8 changes: 0 additions & 8 deletions demos/angular-supabase-todolist/src/env.d.ts

This file was deleted.

6 changes: 3 additions & 3 deletions demos/angular-supabase-todolist/src/environment.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const environment = {
supabaseUrl: process.env.WEBPACK_PUBLIC_SUPABASE_URL,
supabaseKey: process.env.WEBPACK_PUBLIC_SUPABASE_ANON_KEY,
powersyncUrl: process.env.WEBPACK_PUBLIC_POWERSYNC_URL
supabaseUrl: env.WEBPACK_PUBLIC_SUPABASE_URL,
supabaseKey: env.WEBPACK_PUBLIC_SUPABASE_ANON_KEY,
powersyncUrl: env.WEBPACK_PUBLIC_POWERSYNC_URL
};
12 changes: 12 additions & 0 deletions demos/angular-supabase-todolist/src/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Ambient declarations for webpack-injected environment variables.
// webpack's DefinePlugin injects `env` at build time.

declare global {
const env: {
WEBPACK_PUBLIC_SUPABASE_URL: string;
WEBPACK_PUBLIC_SUPABASE_ANON_KEY: string;
WEBPACK_PUBLIC_POWERSYNC_URL: string;
};
}

export {};