UNPKG

validkit

Version:

Javascript form validator

44 lines (42 loc) 876 B
const path = require("path"); const HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = { entry: { "js/validkit": "./src/index.js", }, output: { path: path.resolve(__dirname, "dist"), filename: "[name].js", library: { name: "ValidateForm", type: "umd", }, }, devServer: { static: { directory: path.join(__dirname, "dist"), }, compress: true, port: 9000, }, plugins: [ new HtmlWebpackPlugin({ filename: "index.html", template: "./src/index.html", }), ], module: { rules: [ { test: /\.m?js$/, exclude: /(node_modules|bower_components)/, use: { loader: "babel-loader", options: { presets: ["@babel/preset-env"], }, }, }, ], }, };