educa-sdk
Version:
A JavaScript SDK for interacting with the Educa backend API (Admin, Staff, and Student methods)
28 lines (26 loc) • 792 B
JavaScript
const path = require('path');
module.exports = {
entry: './index.js', // The entry point of your SDK
output: {
filename: 'educa-sdk.js', // The bundled file
path: path.resolve(__dirname, 'dist'), // Output directory
library: 'educaSDK', // This will expose your SDK globally under the 'donbeebsSDK' variable
libraryTarget: 'umd', // Universal Module Definition for compatibility with various environments (Node, browser, etc.)
globalObject: 'this',
},
mode: 'production', // Use production mode for optimization
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
},
},
},
],
},
};