customs_image_shower
Version:
A React component to display images with a full-screen preview
33 lines (30 loc) • 671 B
JavaScript
import path from "path";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default {
entry: "./src/CustomImage.js",
mode: "production",
output: {
path: path.resolve(__dirname, "dist"),
filename: "main.js",
library: "CustomImage",
libraryTarget: "umd",
globalObject: "this",
},
module: {
rules: [
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: "babel-loader",
},
},
],
},
externals: {
react: "react",
"react-dom": "react-dom",
},
};