Skip to content

Commit 3bef9dc

Browse files
author
nezanuha
committed
updated
1 parent ae34272 commit 3bef9dc

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

.npmignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@ coverage/
3535
# Ignore Next.js build output
3636
.next/
3737
out/
38+
39+
40+
!dist/

package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "markdown-text-editor",
3-
"version": "0.0.7-beta.1",
3+
"version": "0.0.8-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.",
55
"main": "dist/markdown-text-editor.js",
66
"repository": {
@@ -18,6 +18,7 @@
1818
"markdown-text-editor",
1919
"markdown-text",
2020
"mde",
21+
"text-editor",
2122
"simple mde",
2223
"markdown",
2324
"editor",
@@ -41,7 +42,10 @@
4142
"url": "https://github.com/nezanuha/markdown-text-editor/issues"
4243
},
4344
"files": [
44-
"dist/**/*"
45+
"dist",
46+
"src",
47+
"README.md",
48+
"LICENSE"
4549
],
4650
"dependencies": {
4751
"marked": "^15.0.4",

webpack.config.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,23 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
33

44
module.exports = {
55
entry: {
6-
"index":'./src/plugins/index.js',
7-
"markdown-text-editor": './src/plugins/markdown/editor.js'
6+
index: './src/plugins/index.js',
7+
'markdown-text-editor': './src/plugins/markdown/editor.js',
88
},
99
output: {
1010
filename: '[name].js', // Output file name
1111
path: path.resolve(__dirname, 'dist'), // Output directory
1212
library: '[name]', // Name of the library
1313
libraryTarget: 'umd', // Universal Module Definition
1414
libraryExport: 'default', // Use default export
15-
globalObject: 'this', // Ensures it works in Node.js and browser
15+
globalObject: 'this', // Ensures compatibility
1616
},
1717
module: {
1818
rules: [
1919
{
2020
test: /\.css$/, // Handle CSS files
2121
use: [
22-
23-
'style-loader', // Inject CSS into the DOM
22+
'style-loader', // Extract CSS into separate files
2423
'css-loader', // Translates CSS into CommonJS
2524
'postcss-loader', // Processes CSS with PostCSS
2625
],
@@ -39,9 +38,13 @@ module.exports = {
3938
},
4039
plugins: [
4140
new MiniCssExtractPlugin({
42-
filename: 'styles.css', // Output CSS filename
41+
filename: '[name].css', // Output CSS filename
4342
}),
4443
],
44+
externals: {
45+
react: 'React', // Avoid bundling React, assume global React
46+
'react-dom': 'ReactDOM',
47+
},
4548
mode: 'production', // Set to 'production' for minified output
4649
devtool: 'source-map', // Enable source maps for easier debugging
47-
};
50+
};

0 commit comments

Comments
 (0)