mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-04 10:19:24 +02:00
Adding no sleep
This commit is contained in:
parent
d6b6ff695d
commit
aad38c5b53
26 changed files with 1029 additions and 0 deletions
48
node_modules/nosleep.js/webpack.config.js
generated
vendored
Normal file
48
node_modules/nosleep.js/webpack.config.js
generated
vendored
Normal file
|
@ -0,0 +1,48 @@
|
|||
const webpack = require("webpack");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
|
||||
const { version, author, license } = require("./package.json");
|
||||
|
||||
module.exports = {
|
||||
mode: "production",
|
||||
entry: {
|
||||
NoSleep: `${__dirname}/src/index.js`,
|
||||
"NoSleep.min": `${__dirname}/src/index.js`,
|
||||
},
|
||||
output: {
|
||||
path: `${__dirname}/dist`,
|
||||
filename: "[name].js",
|
||||
library: "NoSleep",
|
||||
libraryTarget: "umd",
|
||||
globalObject: "this",
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.js$/,
|
||||
exclude: /(node_modules|bower_components)/,
|
||||
use: {
|
||||
loader: "babel-loader",
|
||||
options: {
|
||||
presets: ["env"],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
optimization: {
|
||||
minimize: true,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
test: /\.min\.js(\?.*)?$/i,
|
||||
extractComments: false,
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new webpack.BannerPlugin({
|
||||
banner: `[name].js v${version} - git.io/vfn01 - ${author} - ${license} license`,
|
||||
}),
|
||||
],
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue