Move webpack dotenv to common conf
This commit is contained in:
@@ -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 = {
|
||||
|
||||
@@ -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/",
|
||||
|
||||
Reference in New Issue
Block a user