Jeremy Penner
8dc252d70f
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: "???"
38 lines
701 B
JavaScript
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,
|
|
}),
|
|
],
|
|
};
|