⚙️ Build js with .env from parent directory

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2018-12-21 09:04:25 +01:00
parent 5a140bef35
commit da817d35c4
No known key found for this signature in database
GPG Key ID: A061B9DDE0CA0773
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
const Dotenv = require('dotenv-webpack'); const Dotenv = require('dotenv-webpack');
const path = require('path');
module.exports = { module.exports = {
lintOnSave: false, lintOnSave: false,
@ -6,7 +7,7 @@ module.exports = {
outputDir: '../priv/static', outputDir: '../priv/static',
configureWebpack: { configureWebpack: {
plugins: [ plugins: [
new Dotenv(), new Dotenv({ path: path.resolve(process.cwd(), '../.env') }),
], ],
}, },
}; };