meowio/jsnes/webpack.config.js
Jeremy Penner 8dc252d70f git subrepo clone https://github.com/bfirsh/jsnes.git
subrepo:
  subdir:   "jsnes"
  merged:   "d8021d0"
upstream:
  origin:   "https://github.com/bfirsh/jsnes.git"
  branch:   "master"
  commit:   "d8021d0"
git-subrepo:
  version:  "0.4.9"
  origin:   "???"
  commit:   "???"
2024-10-29 20:12:13 -04:00

38 lines
701 B
JavaScript

var path = require("path");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
module.exports = {
entry: {
jsnes: "./src/index.js",
"jsnes.min": "./src/index.js",
},
devtool: "source-map",
output: {
path: path.resolve(__dirname, "dist"),
filename: "[name].js",
library: "jsnes",
libraryTarget: "umd",
umdNamedDefine: true,
},
module: {
rules: [
{
test: /\.js$/,
enforce: "pre",
exclude: /node_modules/,
use: [
{
loader: "eslint-loader",
},
],
},
],
},
plugins: [
new UglifyJsPlugin({
include: /\.min\.js$/,
sourceMap: true,
}),
],
};