Skip to content

Commit

Permalink
Fix .env variabelen in .ts
Browse files Browse the repository at this point in the history
  • Loading branch information
cbasje committed Mar 6, 2023
1 parent 3f4f80a commit b3297c1
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 34 deletions.
3 changes: 2 additions & 1 deletion assets/js/page/instellingen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const instellingVeranderd = () => {
.forEach((el) => el.classList.remove('d-none'));
};

const applicationServerKey = process.env.VAPID_PUBLIC_KEY;
const meta = document.getElementsByTagName('meta');
const applicationServerKey = meta['vapid-public-key'].content;
let isPushAvailable = false;

const pushAbboneer = async () => {
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"autoprefixer": "^9.1.1",
"cross-env": "^7.0.3",
"css-loader": "^6.7.1",
"dotenv-webpack": "^8.0.1",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-formatter-json-relative": "^0.1.0",
Expand Down
1 change: 1 addition & 0 deletions templates/base.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<meta name="description" content="{{ instelling('stek', 'beschrijving') }}">
<meta name="google-site-verification" content="zLTm1NVzZPHx7jiGHBpe4HeH1goQAlJej2Rdc0_qKzE"/>
<meta name="apple-itunes-app" content="app-id=1112148892, app-argument={{ app.request.uri }}">
<meta name="vapid-public-key" content="{{ app.request.server.get('VAPID_PUBLIC_KEY') }}">
{% include 'common/sentry.html.twig' %}
<meta property="og:type" content="article">
<meta property="og:url" content="{{ app.request.uri }}"/>
Expand Down
4 changes: 0 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const { VueLoaderPlugin } = require('vue-loader');
const MomentLocalesPlugin = require('moment-locales-webpack-plugin');
const WebpackAssetsManifest = require('webpack-assets-manifest');
const ESLintPlugin = require('eslint-webpack-plugin');
const Dotenv = require('dotenv-webpack');

module.exports = (env, argv) => {
let styleEntries = {
Expand Down Expand Up @@ -119,9 +118,6 @@ module.exports = (env, argv) => {
new MomentLocalesPlugin({
localesToKeep: ['nl'],
}),
new Dotenv({
path: './.env.local',
}),
],
module: {
// Regels voor bestanden die webpack tegenkomt, als `test` matcht wordt de rule uitgevoerd.
Expand Down
28 changes: 0 additions & 28 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2807,33 +2807,6 @@ __metadata:
languageName: node
linkType: hard

"dotenv-defaults@npm:^2.0.2":
version: 2.0.2
resolution: "dotenv-defaults@npm:2.0.2"
dependencies:
dotenv: ^8.2.0
checksum: c005960bd048e2189c4799e729c41f362e415e6e0b54313d3f31e853a84b049bf770b25cb21c112c2805bb13a8376edc9de451fb514abf8546392d327c27f6e5
languageName: node
linkType: hard

"dotenv-webpack@npm:^8.0.1":
version: 8.0.1
resolution: "dotenv-webpack@npm:8.0.1"
dependencies:
dotenv-defaults: ^2.0.2
peerDependencies:
webpack: ^4 || ^5
checksum: ee73eda78df90bcf7446763dfe5e518a2054ed6222783856912d2c6a255fdfc041854e125e036ff2603b06fb44f5234713fad5feecb1e66a54fe78a35a98fb87
languageName: node
linkType: hard

"dotenv@npm:^8.2.0":
version: 8.6.0
resolution: "dotenv@npm:8.6.0"
checksum: 38e902c80b0666ab59e9310a3d24ed237029a7ce34d976796349765ac96b8d769f6df19090f1f471b77a25ca391971efde8a1ea63bb83111bd8bec8e5cc9b2cd
languageName: node
linkType: hard

"dropzone@npm:^5.5.0":
version: 5.7.1
resolution: "dropzone@npm:5.7.1"
Expand Down Expand Up @@ -6266,7 +6239,6 @@ fsevents@~2.3.1:
datatables.net-scroller-dt: ^2.0.0
datatables.net-select: ^1.3.3
datatables.net-select-dt: ^1.3.0
dotenv-webpack: ^8.0.1
dropzone: ^5.5.0
eslint: ^8.34.0
eslint-config-prettier: ^8.6.0
Expand Down

0 comments on commit b3297c1

Please sign in to comment.