no-sleep-app
Version:
NoSleepApp is a lightweight JavaScript library that prevents devices from going to sleep during critical activities. It uses the Screen Wake Lock API or a fallback video playback method to keep the screen active, ensuring uninterrupted user experiences ac
40 lines (39 loc) • 768 B
JavaScript
const path = require('path');
module.exports = {
entry: './src/index.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, 'dist'),
library: "NoSleepApp",
libraryTarget: "umd",
globalObject: "this",
},
mode: 'production',
module: {
rules: [
{
test: /\.json$/,
type: 'javascript/auto',
use: ['json-loader'],
},
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
},
},
},
{
test: /\.scss$/,
use: [
'style-loader',
'css-loader',
'sass-loader',
],
},
],
}
};