diff --git a/.eslintignore b/.eslintignore index a6b6b38..923fab4 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,6 @@ dist +build docs node_modules -.eslintrc.js \ No newline at end of file +.eslintrc.js +tsconfig.json \ No newline at end of file diff --git a/webpack.config.js b/webpack.config.js new file mode 100644 index 0000000..a74393b --- /dev/null +++ b/webpack.config.js @@ -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"], + }, +};