mirror of
https://github.com/orionprotocol/sdk.git
synced 2026-03-14 22:22:35 +03:00
26 lines
750 B
JavaScript
26 lines
750 B
JavaScript
const path = require("path");
|
|
|
|
module.exports = (env, argv) => {
|
|
return {
|
|
entry: {
|
|
index: path.resolve(__dirname, "./lib/esm/index.js")
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, "./lib/umd"), // builds to ./lib/umd/
|
|
filename: "[name].js", // index.js
|
|
library: "orionprotocol", // aka window.myLibrary
|
|
libraryTarget: "umd", // supports commonjs, amd and web browsers
|
|
globalObject: "this"
|
|
},
|
|
module: {
|
|
rules: [{ test: /\.t|js$/, use: "babel-loader" }]
|
|
},
|
|
resolve: {
|
|
fallback: {
|
|
"crypto": require.resolve("crypto-browserify"),
|
|
"buffer": require.resolve("buffer/"),
|
|
"stream": require.resolve("stream-browserify"),
|
|
}
|
|
}
|
|
};
|
|
}; |