mirror of
https://github.com/koodo-reader/koodo-reader.git
synced 2025-12-23 23:17:55 -05:00
39 lines
858 B
JavaScript
39 lines
858 B
JavaScript
const path = require("path");
|
|
const HardSourceWebpackPlugin = require("hard-source-webpack-plugin");
|
|
|
|
module.exports = {
|
|
target: "electron-main",
|
|
entry: "./main.js",
|
|
output: {
|
|
path: path.resolve(__dirname, "./build"),
|
|
filename: "main.js",
|
|
},
|
|
resolve: {
|
|
extensions: [".ts", "*", ".mjs", ".js", ".json", ".tsx"],
|
|
},
|
|
node: {
|
|
__dirname: false,
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.mjs$/,
|
|
include: /node_modules/,
|
|
type: "javascript/auto",
|
|
},
|
|
{
|
|
test: /\.(js|jsx|ts|tsx)$/,
|
|
exclude: /node_modules/,
|
|
use: {
|
|
loader: "babel-loader",
|
|
options: {
|
|
presets: ["@babel/preset-env", "@babel/preset-react"],
|
|
plugins: ["react-hot-loader/babel"]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
},
|
|
plugins: [new HardSourceWebpackPlugin()],
|
|
};
|