@vixoniccom/module-packager 2.13.0-dev.0 → 2.13.0-dev.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,6 +19,14 @@ export default (env = {}, argv = {}) => {
19
19
  const controllerStaticPath = path.resolve(path.dirname(controllerHtmlPath), '../static');
20
20
  const controllerFontsPath = path.resolve(path.dirname(controllerHtmlPath), '../fonts');
21
21
  const controllerTestPath = path.resolve(options.src, 'test');
22
+ // Process all environment variables
23
+ const getEnvironmentVariables = () => {
24
+ const envVars = {};
25
+ Object.keys(process.env).forEach((key) => {
26
+ envVars[`process.env.${key}`] = JSON.stringify(process.env[key]);
27
+ });
28
+ return envVars;
29
+ };
22
30
  return {
23
31
  mode: isDev ? 'development' : 'production',
24
32
  target: options.target ?? 'electron-renderer',
@@ -100,12 +108,7 @@ export default (env = {}, argv = {}) => {
100
108
  plugins: [
101
109
  new webpack.DefinePlugin({
102
110
  global: 'globalThis',
103
- // env variables
104
- 'process.env.AQI_TOKEN': JSON.stringify(process.env.AQI_TOKEN || ''),
105
- 'process.env.PTS_CLIENT_ID': JSON.stringify(process.env.PTS_CLIENT_ID || ''),
106
- 'process.env.PTS_CLIENT_SECRET': JSON.stringify(process.env.PTS_CLIENT_SECRET || ''),
107
- 'process.env.FS_API_KEY': JSON.stringify(process.env.FS_API_KEY || ''),
108
- 'process.env.FS_API_HOST': JSON.stringify(process.env.FS_API_HOST || ''),
111
+ ...getEnvironmentVariables(),
109
112
  }),
110
113
  new webpack.ProvidePlugin({
111
114
  process: 'process/browser.js',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vixoniccom/module-packager",
3
- "version": "2.13.0-dev.0",
3
+ "version": "2.13.0-dev.1",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "bin": {