diff --git a/configs/webpack/common.js b/configs/webpack/common.js index e459072..f40ba5b 100644 --- a/configs/webpack/common.js +++ b/configs/webpack/common.js @@ -3,6 +3,7 @@ const {resolve} = require("path"); const {CheckerPlugin} = require("awesome-typescript-loader"); const StyleLintPlugin = require("stylelint-webpack-plugin"); const webpack = require('webpack'); +const Dotenv = require("dotenv-webpack"); module.exports = function (env, argv) { const config = {}; @@ -44,6 +45,9 @@ module.exports = function (env, argv) { new webpack.DefinePlugin(envVars), new CheckerPlugin(), new StyleLintPlugin(), + new Dotenv({ + path: "./.env" + }), ]; config.performance = { diff --git a/configs/webpack/dev.js b/configs/webpack/dev.js index d857336..293701f 100644 --- a/configs/webpack/dev.js +++ b/configs/webpack/dev.js @@ -3,7 +3,6 @@ const merge = require("webpack-merge"); const webpack = require("webpack"); const FaviconsWebpackPlugin = require("favicons-webpack-plugin"); const HtmlWebpackPlugin = require("html-webpack-plugin"); -const Dotenv = require("dotenv-webpack"); const commonConfig = require("./common.js"); @@ -28,9 +27,6 @@ module.exports = function (env, argv) { }; base.devtool = "cheap-module-eval-source-map"; base.plugins = base.plugins.concat([ - new Dotenv({ - path: "./.env" - }), new FaviconsWebpackPlugin({ logo: "./assets/img/favicon.png", prefix: "assets/icons/",