-
Notifications
You must be signed in to change notification settings - Fork 1
/
webpack.config.js
40 lines (39 loc) · 1003 Bytes
/
webpack.config.js
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
33
34
35
36
37
38
39
40
/* eslint-disable @typescript-eslint/no-var-requires */
const webpack = require('webpack');
const nodeExternals = require('webpack-node-externals');
const path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
target: 'node',
entry: './src/index.ts',
output: {
path: path.resolve(__dirname + '/dist'),
filename: 'hyper-dynamic-wallpaper.js',
libraryTarget: 'commonjs',
},
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
keep_classnames: true,
keep_fnames: true,
},
}),
],
},
// plugins: [ new webpack.DefinePlugin({ 'global.GENTLY': false }) ],
externals: [nodeExternals(), 'hyper/component', 'hyper/notify', 'hyper/decorate'],
module: {
rules: [
{
test: /\.(ts|js)x?$/,
loader: 'babel-loader',
exclude: /node_modules/,
},
],
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
};