1
0
Fork 0
mirror of https://github.com/classchartsapi/classcharts-api-js.git synced 2026-05-14 19:59:37 +00:00

feat: webpack

This commit is contained in:
James Cook 2022-03-24 18:55:01 +00:00
parent ab9659a69f
commit 03f0611348
2 changed files with 33 additions and 1 deletions

30
webpack.config.js Normal file
View file

@ -0,0 +1,30 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable no-undef */
const path = require("path");
module.exports = {
mode: "development",
entry: "./src/index",
devtool: "source-map",
module: {
rules: [
{
test: /\.tsx?$/,
use: "ts-loader",
exclude: /node_modules/,
},
],
},
output: {
library: {
name: "classchartsapi",
type: "umd",
},
sourceMapFilename: "classcharts-api.map",
path: path.resolve(__dirname, "build"),
filename: "classcharts-api.js",
},
resolve: {
extensions: [".ts", ".js"],
},
};