@vonaffenfels/contentful-slate-editor 1.0.2 → 1.0.3
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 +8 -5
- package/webpack.config.js +22 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/contentful-slate-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"prepublish": "yarn run build",
|
|
6
6
|
"dev": "yarn run start",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"start": "webpack serve --config webpack.config.dev.js",
|
|
10
10
|
"vercelDev": "cp ./.vercel.project.json ../../.vercel/project.json && cd ../../ && vercel dev"
|
|
11
11
|
},
|
|
12
|
-
"
|
|
12
|
+
"peerDependencies": {
|
|
13
13
|
"@babel/core": "^7.20.12",
|
|
14
14
|
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
|
15
15
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"@contentful/forma-36-react-components": "^3.88.3",
|
|
23
23
|
"@contentful/forma-36-tokens": "^0.10.1",
|
|
24
24
|
"@svgr/webpack": "^5.5.0",
|
|
25
|
-
"@vonaffenfels/slate-editor": "^1.0.2",
|
|
26
25
|
"babel-loader": "^8.2.2",
|
|
27
26
|
"clean-webpack-plugin": "^3.0.0",
|
|
28
27
|
"cloudinary": "^1.25.1",
|
|
@@ -37,6 +36,7 @@
|
|
|
37
36
|
"mini-css-extract-plugin": "^1.5.0",
|
|
38
37
|
"postcss": "8.4.14",
|
|
39
38
|
"postcss-loader": "^5.2.0",
|
|
39
|
+
"raw-loader": "^4.0.2",
|
|
40
40
|
"react": "18.2.0",
|
|
41
41
|
"react-dom": "18.2.0",
|
|
42
42
|
"react-uid": "^2.3.1",
|
|
@@ -46,11 +46,14 @@
|
|
|
46
46
|
"style-loader": "^2.0.0",
|
|
47
47
|
"tailwindcss": "3.3.2",
|
|
48
48
|
"url-loader": "^4.1.1",
|
|
49
|
-
"webpack": "5.73.0",
|
|
50
49
|
"webpack-cli": "^4.6.0",
|
|
51
50
|
"webpack-dev-server": "^4.0.0-beta.2"
|
|
52
51
|
},
|
|
53
|
-
"
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"@vonaffenfels/slate-editor": "^1.0.3",
|
|
54
|
+
"webpack": "5.73.0"
|
|
55
|
+
},
|
|
56
|
+
"gitHead": "5886b3f191d7e644434c7baef0808194aec62802",
|
|
54
57
|
"publishConfig": {
|
|
55
58
|
"access": "public"
|
|
56
59
|
}
|
package/webpack.config.js
CHANGED
|
@@ -6,17 +6,18 @@ const {readFileSync} = require("fs");
|
|
|
6
6
|
const {CleanWebpackPlugin} = require('clean-webpack-plugin');
|
|
7
7
|
|
|
8
8
|
module.exports = ({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
9
|
+
babelConfig = JSON.parse(readFileSync("../../.babelrc").toString()),
|
|
10
|
+
componentImportRoot = "@vonaffenfels/slate-editor/src/dev/testComponents",
|
|
11
|
+
relativePathToComponents = path.resolve(__dirname + "../../../@vonaffenfels/slate-editor/src/dev/testComponents"),
|
|
12
|
+
postCssConfig = {
|
|
13
|
+
plugins: {
|
|
14
|
+
'postcss-import': {},
|
|
15
|
+
tailwindcss: {},
|
|
16
|
+
autoprefixer: {},
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
transpilePaths = [],
|
|
20
|
+
}) => {
|
|
20
21
|
return {
|
|
21
22
|
mode: 'production',
|
|
22
23
|
entry: {index: './src/index.js'},
|
|
@@ -32,6 +33,10 @@ module.exports = ({
|
|
|
32
33
|
storiesImportRoot: componentImportRoot,
|
|
33
34
|
},
|
|
34
35
|
},
|
|
36
|
+
{
|
|
37
|
+
loader: 'babel-loader',
|
|
38
|
+
options: babelConfig,
|
|
39
|
+
},
|
|
35
40
|
],
|
|
36
41
|
},
|
|
37
42
|
{
|
|
@@ -44,6 +49,10 @@ module.exports = ({
|
|
|
44
49
|
componentImportRoot: componentImportRoot,
|
|
45
50
|
},
|
|
46
51
|
},
|
|
52
|
+
{
|
|
53
|
+
loader: 'babel-loader',
|
|
54
|
+
options: babelConfig,
|
|
55
|
+
},
|
|
47
56
|
],
|
|
48
57
|
},
|
|
49
58
|
{
|
|
@@ -51,6 +60,7 @@ module.exports = ({
|
|
|
51
60
|
include: [
|
|
52
61
|
path.resolve(__dirname, 'src'),
|
|
53
62
|
relativePathToComponents,
|
|
63
|
+
...transpilePaths,
|
|
54
64
|
],
|
|
55
65
|
use: [
|
|
56
66
|
{
|
|
@@ -107,11 +117,7 @@ module.exports = ({
|
|
|
107
117
|
},
|
|
108
118
|
{
|
|
109
119
|
test: /\.(graphql|gql)$/,
|
|
110
|
-
|
|
111
|
-
path.resolve(__dirname, 'src'),
|
|
112
|
-
path.resolve(__dirname, '../../@frontend/components'),
|
|
113
|
-
],
|
|
114
|
-
loader: 'graphql-tag/loader',
|
|
120
|
+
loader: 'raw-loader',
|
|
115
121
|
},
|
|
116
122
|
],
|
|
117
123
|
},
|