You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
m3u8-downloader-TypeScript/webpack.main.config.js

32 lines
650 B
JavaScript

const ESLintPlugin = require("eslint-webpack-plugin");
const fs = require("fs");
const dotenv = require("dotenv");
const rules = require("./webpack.rules");
const envConfig = dotenv.parse(fs.readFileSync(".env.override"));
for (const k of Object.keys(envConfig)) {
process.env[k] = envConfig[k];
}
module.exports = {
entry: "./src/main/index.js",
module: {
rules: [
...rules,
{
test: /\.js$/,
use: "babel-loader",
exclude: /node_modules/,
},
],
},
plugins: [
new ESLintPlugin({
exclude: "node_modules",
}),
],
resolve: {
extensions: [".js", ".jsx", ".css"],
},
};