Skip to content

Commit

Permalink
Merge pull request #957 from shordeaux/mix-vars-js
Browse files Browse the repository at this point in the history
populate process.env vars to allow Echo usage
  • Loading branch information
nWidart committed Apr 7, 2020
2 parents f473fe4 + acc82fc commit 4886efa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/Commands/stubs/webpack.stub
@@ -1,3 +1,6 @@
const dotenvExpand = require('dotenv-expand');
dotenvExpand(require('dotenv').config({ path: '../../.env'/*, debug: true*/}));

const mix = require('laravel-mix');
require('laravel-mix-merge-manifest');

Expand All @@ -8,4 +11,4 @@ mix.js(__dirname + '/Resources/assets/js/app.js', 'js/$LOWER_NAME$.js')

if (mix.inProduction()) {
mix.version();
}
}
@@ -1,4 +1,9 @@
<?php return 'const mix = require(\'laravel-mix\');
<?php

return 'const dotenvExpand = require(\'dotenv-expand\');
dotenvExpand(require(\'dotenv\').config({ path: \'../../.env\'/*, debug: true*/}));
const mix = require(\'laravel-mix\');
require(\'laravel-mix-merge-manifest\');
mix.setPublicPath(\'../../public\').mergeManifest();
Expand All @@ -8,4 +13,5 @@
if (mix.inProduction()) {
mix.version();
}';
}
';

0 comments on commit 4886efa

Please sign in to comment.