@bigbinary/neeto-editor 0.2.12 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-editor",
3
- "version": "0.2.12",
3
+ "version": "0.2.16",
4
4
  "main": "./build/index.js",
5
5
  "description": "Neeto Editor is the library that drives the rich text experience in all Neeto products built at BigBinary",
6
6
  "keywords": [
@@ -53,6 +53,7 @@
53
53
  "@babel/plugin-proposal-class-properties": "^7.13.0",
54
54
  "@babel/preset-env": "^7.13.15",
55
55
  "@babel/preset-react": "^7.13.13",
56
+ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.3",
56
57
  "autoprefixer": "^9",
57
58
  "babel-loader": "^8.2.2",
58
59
  "css-loader": "^4.3.0",
@@ -67,6 +68,7 @@
67
68
  "postcss-preset-env": "^6.7.0",
68
69
  "react": "17.0.2",
69
70
  "react-dom": "17.0.2",
71
+ "react-refresh": "^0.11.0",
70
72
  "react-scripts": "4.0.3",
71
73
  "sass": "^1.26.11",
72
74
  "sass-loader": "^10.0.2",
@@ -82,7 +84,7 @@
82
84
  },
83
85
  "scripts": {
84
86
  "start": "NODE_ENV=development webpack-dev-server --open --mode development --config webpack.dev.config.js",
85
- "build": "NODE_ENV=production webpack --config webpack.dev.config.js",
87
+ "build": "NODE_ENV=production webpack --config webpack.example.config.js",
86
88
  "webpack-build": "NODE_ENV=production webpack --mode production"
87
89
  },
88
90
  "eslintConfig": {
package/webpack.config.js CHANGED
@@ -38,7 +38,7 @@ module.exports = [
38
38
  ],
39
39
  },
40
40
  output: {
41
- path: __dirname + "/dist",
41
+ path: __dirname + "/build",
42
42
  filename: "index.js",
43
43
  library: "neeto-editor",
44
44
  libraryTarget: "umd",
@@ -79,5 +79,8 @@ module.exports = [
79
79
  optimization: {
80
80
  minimizer: [new CssMinimizerPlugin()],
81
81
  },
82
+ output: {
83
+ path: __dirname + "/dist",
84
+ },
82
85
  },
83
86
  ];
@@ -1,12 +1,10 @@
1
1
  const HtmlWebPackPlugin = require("html-webpack-plugin");
2
+ const ReactRefreshWebpackPlugin = require("@pmmmwh/react-refresh-webpack-plugin");
2
3
  const path = require("path");
3
4
 
4
5
  module.exports = {
5
6
  entry: "./example/index.js",
6
- devtool:
7
- process.env.NODE_ENV === "production"
8
- ? "source-map"
9
- : "cheap-module-eval-source-map",
7
+ devtool: "cheap-module-eval-source-map",
10
8
  module: {
11
9
  rules: [
12
10
  {
@@ -14,6 +12,9 @@ module.exports = {
14
12
  exclude: /node_modules/,
15
13
  use: {
16
14
  loader: "babel-loader",
15
+ options: {
16
+ plugins: ["react-refresh/babel"],
17
+ },
17
18
  },
18
19
  },
19
20
  {
@@ -52,12 +53,14 @@ module.exports = {
52
53
  },
53
54
  devServer: {
54
55
  historyApiFallback: true,
56
+ hot: true,
55
57
  },
56
58
  plugins: [
57
59
  new HtmlWebPackPlugin({
58
60
  template: "./public/index.html",
59
61
  filename: "./index.html",
60
62
  }),
63
+ new ReactRefreshWebpackPlugin({ overlay: false }),
61
64
  ],
62
65
  resolve: {
63
66
  alias: {
@@ -0,0 +1,67 @@
1
+ const HtmlWebPackPlugin = require("html-webpack-plugin");
2
+ const path = require("path");
3
+
4
+ module.exports = {
5
+ entry: "./example/index.js",
6
+ devtool: "source-map",
7
+ module: {
8
+ rules: [
9
+ {
10
+ test: /\.(js|jsx)$/,
11
+ exclude: /node_modules/,
12
+ use: {
13
+ loader: "babel-loader",
14
+ },
15
+ },
16
+ {
17
+ test: /\.html$/,
18
+ use: [
19
+ {
20
+ loader: "html-loader",
21
+ },
22
+ ],
23
+ },
24
+ {
25
+ test: /\.(png|jpe?g|gif|svg)$/i,
26
+ use: [
27
+ {
28
+ loader: "file-loader",
29
+ },
30
+ ],
31
+ },
32
+ {
33
+ test: /\.(sass|css|scss)$/,
34
+ use: [
35
+ // Creates `style` nodes from JS strings
36
+ "style-loader",
37
+ // Translates CSS into CommonJS
38
+ "css-loader",
39
+ "postcss-loader",
40
+ // Compiles Sass to CSS
41
+ "sass-loader",
42
+ ],
43
+ },
44
+ ],
45
+ },
46
+ output: {
47
+ path: __dirname + "/build",
48
+ publicPath: "/",
49
+ },
50
+ devServer: {
51
+ historyApiFallback: true,
52
+ },
53
+ plugins: [
54
+ new HtmlWebPackPlugin({
55
+ template: "./public/index.html",
56
+ filename: "./index.html",
57
+ }),
58
+ ],
59
+ resolve: {
60
+ alias: {
61
+ components: path.resolve(__dirname, "/lib/components"),
62
+ hooks: path.resolve(__dirname, "/lib/hooks"),
63
+ constants: path.resolve(__dirname, "/lib/constants"),
64
+ utils: path.resolve(__dirname, "/lib/utils"),
65
+ },
66
+ },
67
+ };