UNPKG

react-jodit-editor

Version:

React WYSIWYG Editor Which Uses Jodit & Jodit-React In A Simplified Component

56 lines (54 loc) 1.12 kB
const HtmlWebPackPlugin = require("html-webpack-plugin"); module.exports = { mode: "production", entry: "./src/index.js", output: { path: `${__dirname}/dist`, filename: "index.js", library: "react-jodit-editor", libraryTarget: "commonjs2", }, watchOptions: { aggregateTimeout: 600, ignored: /node_modules/, }, module: { rules: [ { test: /\.(js|jsx)$/, exclude: /node_modules/, use: { loader: "babel-loader" }, }, { test: /\.html$/, use: [{ loader: "html-loader" }], }, ], }, resolve: { alias: { react: `${__dirname}/./node_modules/react`, "react-dom": `${__dirname}/./node_modules/react-dom"`, }, }, externals: { react: { commonjs: "react", commonjs2: "react", amd: "React", root: "React", }, "react-dom": { commonjs: "react-dom", commonjs2: "react-dom", amd: "ReactDOM", root: "ReactDOM", }, }, plugins: [ new HtmlWebPackPlugin({ template: "./index.html", filename: "index.html", }), ], };