forked from pk910/PoWFaucet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebpack.config.js
More file actions
32 lines (29 loc) · 748 Bytes
/
webpack.config.js
File metadata and controls
32 lines (29 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import path, { dirname } from 'path';
import fs from 'fs';
import { fileURLToPath } from "url";
import webpack from "webpack";
let importUrl = fileURLToPath(import.meta.url);
const basedir = dirname(importUrl);
let packageJson = JSON.parse(fs.readFileSync(path.join(basedir, "package.json"), 'utf8'));
export default {
entry: './dist/app.js',
target: 'node',
resolve: {
extensions: ['.ts', '.js'],
},
output: {
filename: 'powfaucet.cjs',
path: path.resolve(basedir, 'bundle'),
},
plugins: [
new webpack.optimize.LimitChunkCountPlugin({
maxChunks: 1,
}),
new webpack.DefinePlugin({
POWFAUCET_VERSION: JSON.stringify(packageJson.version),
}),
],
optimization: {
minimize: false
}
};