Skip to content

Commit 5a6c051

Browse files
author
nezanuha
committed
updated
1 parent d4c8d93 commit 5a6c051

File tree

3 files changed

+18
-10
lines changed

3 files changed

+18
-10
lines changed

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ <h2 class="mb-4 text-xl font-bold text-gray-900 dark:text-white">Update product<
5656

5757
<button type="button" class="btn">btn</button>
5858

59-
<!-- <script src="./dist/nezanuha/markdownEditor.js"></script> -->
59+
<!-- <script src="./dist/markdown-text-editor.js"></script> -->
6060
<script type="module">
61-
import { markdownEditor } from 'markdown-text-editor'
61+
import markdownEditor from 'markdown-text-editor'
6262
const options = {
6363
placeholder: 'Start writing...',
6464
toolbar: ['bold', 'italic', 'strikethrough', 'preview'],

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "markdown-text-editor",
3-
"version": "0.0.14-beta.1",
3+
"version": "0.0.15-beta.1",
44
"description": "A powerful, easy-to-use Markdown editor with a real-time preview, syntax highlighting. Ideal for developers, writers, and content creators who need a seamless, interactive writing experience with full Markdown support.",
5-
"main": "./src/plugins/markdown/editor.js",
5+
"main": "./dist/markdown-text-editor.js",
66
"files": [
77
"dist/**/*",
88
"src/**/*"

webpack.config.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
const path = require('path');
22
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
3+
const TerserPlugin = require('terser-webpack-plugin');
34

45
module.exports = (env, argv) => {
56
const isProd = process.env.NODE_ENV === 'production';
67
return {
8+
mode: isProd ? 'production' : 'development', // Set to 'production' for minified output
9+
stats: 'minimal',
710
entry: {
811
index: './src/plugins/index.js',
912
'markdown-text-editor': './src/plugins/markdown/editor.js',
1013
},
14+
resolve: {
15+
extensions: ['.ts', '.js'],
16+
},
1117
output: {
1218
filename: '[name].js', // Output file name
1319
path: path.resolve(__dirname, 'dist'), // Output directory
@@ -43,11 +49,13 @@ module.exports = (env, argv) => {
4349
filename: 'styles.css', // Output CSS filename
4450
}),
4551
],
46-
externals: {
47-
react: 'React', // Avoid bundling React, assume global React
48-
'react-dom': 'ReactDOM',
49-
},
50-
mode: 'development', // Set to 'production' for minified output
51-
devtool: 'source-map', // Enable source maps for easier debugging
52+
optimization: {
53+
minimize: true,
54+
minimizer: [
55+
new TerserPlugin({
56+
extractComments: false,
57+
}),
58+
],
59+
}
5260
};
5361
};

0 commit comments

Comments
 (0)