Files
RTSPtoWEBPlayer/webpack.config.js
vdalex 6147a019f8 renew
2024-02-13 11:35:58 +03:00

50 lines
978 B
JavaScript

const path = require("path");
module.exports = {
mode: "development", //production,development
watch: false,
target: "web",
entry: {
RTSPtoWEBPlayer: "./src/rtsp-to-web-player.js",
},
output: {
path: __dirname + "/dist",
filename: "[name].js",
library: "[name]",
libraryExport: "default",
globalObject: "this",
},
module: {
rules: [
{
test: /\.js$/,
loader: "babel-loader",
options: {
presets: [
[
"@babel/preset-env",
{
targets: {
safari: "11",
},
},
],
],
plugins: ["@babel/plugin-proposal-class-properties"],
},
},
{
test: /\.css$/,
use: ["style-loader", "css-loader"],
},
],
},
devServer: {
static: {
directory: path.join(__dirname, "dist"),
},
compress: true,
port: 9000,
},
};