@vixoniccom/module-packager 2.13.0-test.5 → 2.13.0-test.6

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.
@@ -15,6 +15,15 @@ export default (env = {}, argv = {}) => {
15
15
  };
16
16
  const isDev = options.mode === 'development' || argv.watch === true || process.env.NODE_ENV === 'development';
17
17
  const buildPath = path.resolve(options.build);
18
+ // Process all environment variables
19
+ const getEnvironmentVariables = () => {
20
+ const envVars = {};
21
+ Object.keys(process.env).forEach((key) => {
22
+ envVars[`process.env.${key}`] = JSON.stringify(process.env[key]);
23
+ });
24
+ console.log('Environment variables found:', Object.keys(process.env).length);
25
+ return envVars;
26
+ };
18
27
  const controllerHtmlPath = path.resolve(options.src, 'index.html');
19
28
  const controllerStaticPath = path.resolve(path.dirname(controllerHtmlPath), '../static');
20
29
  const controllerFontsPath = path.resolve(path.dirname(controllerHtmlPath), '../fonts');
@@ -100,6 +109,7 @@ export default (env = {}, argv = {}) => {
100
109
  plugins: [
101
110
  new webpack.DefinePlugin({
102
111
  global: 'globalThis',
112
+ ...getEnvironmentVariables(),
103
113
  }),
104
114
  new webpack.ProvidePlugin({
105
115
  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-test.5",
3
+ "version": "2.13.0-test.6",
4
4
  "type": "module",
5
5
  "license": "ISC",
6
6
  "bin": {