Skip to content

Commit 9461daa

Browse files
authored
Merge pull request #6 from gradinarufelix/fix-use-esbuild
Fix: Use esbuild and bump to Neos.Neos.Ui ^8.0
2 parents f3d8f32 + d97612d commit 9461daa

File tree

7 files changed

+207
-7856
lines changed

7 files changed

+207
-7856
lines changed

Resources/Private/JsEvents/build.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
const esbuild = require('esbuild');
2+
const isWatch = process.argv.includes('--watch');
3+
4+
/** @type {import("esbuild").BuildOptions} */
5+
const options = {
6+
logLevel: "info",
7+
bundle: true,
8+
minify: true,
9+
target: "es2020",
10+
sourcemap: 'linked',
11+
entryPoints: {"Plugin": "src/index.js"},
12+
loader: {
13+
".js": "tsx",
14+
},
15+
alias: require("@neos-project/neos-ui-extensibility/extensibilityMap.json"),
16+
outdir: "../../Public/JsEvents",
17+
}
18+
19+
if (isWatch) {
20+
esbuild.context(options).then((ctx) => ctx.watch())
21+
} else {
22+
esbuild.build(options)
23+
}

Resources/Private/JsEvents/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"description": "MhsDesign.LiveInspectorJsEvents",
33
"scripts": {
4-
"build": "NODE_ENV=production neos-react-scripts build",
5-
"watch": "neos-react-scripts watch"
4+
"build": "node build.js",
5+
"watch": "node build.js --watch"
66
},
77
"devDependencies": {
8-
"@neos-project/neos-ui-extensibility": "^7.2"
8+
"@neos-project/neos-ui-extensibility": "^8.0",
9+
"esbuild": "^0.17.0"
910
},
1011
"neos": {
1112
"buildTargetDirectory": "../../Public/JsEvents"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"compilerOptions": {
3+
"target": "esnext",
4+
"lib": ["dom", "esnext", "dom.iterable"],
5+
"jsx": "react",
6+
"experimentalDecorators": true,
7+
"module": "esnext",
8+
"moduleResolution": "node",
9+
"noEmit": true,
10+
"stripInternal": true,
11+
"allowSyntheticDefaultImports": true,
12+
"esModuleInterop": true,
13+
"forceConsistentCasingInFileNames": true,
14+
"strict": true,
15+
"noImplicitAny": true,
16+
"noUnusedLocals": true,
17+
"noUnusedParameters": true,
18+
"noImplicitReturns": true,
19+
"noFallthroughCasesInSwitch": true,
20+
"skipLibCheck": true
21+
}
22+
}

0 commit comments

Comments
 (0)