setVisible(false)}>
+ EULA Not Accepted
+
+ It looks like you have not yet accepted the Minecraft EULA. In order to start this server you
+ must set eula=true inside the eula.txt file in the File Manager.
+
+
+ );
+};
+
+export default EulaModalFeature;
diff --git a/resources/scripts/components/server/features/index.ts b/resources/scripts/components/server/features/index.ts
new file mode 100644
index 000000000..2c285feb6
--- /dev/null
+++ b/resources/scripts/components/server/features/index.ts
@@ -0,0 +1,11 @@
+import { lazy } from 'react';
+
+/**
+ * Custom features should be registered here as lazy components so that they do
+ * not impact the generated JS bundle size. They will be automatically loaded in
+ * whenever they are actually loaded for the client (which may be never, depending
+ * on the feature and the egg).
+ */
+const EulaModalFeature = lazy(() => import(/* webpackChunkName: "feature.eula" */'@feature/eula/EulaModalFeature'));
+
+export { EulaModalFeature };
diff --git a/tsconfig.json b/tsconfig.json
index 41a4286b9..4b14bec71 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -11,11 +11,17 @@
"esModuleInterop": true,
"sourceMap": true,
"baseUrl": ".",
- "lib": ["es2015", "dom"],
+ "lib": [
+ "es2015",
+ "dom"
+ ],
"importsNotUsedAsValues": "preserve",
"paths": {
"@/*": [
"./resources/scripts/*"
+ ],
+ "@feature/*": [
+ "./resources/scripts/components/server/features/*"
]
},
"plugins": [
@@ -23,7 +29,9 @@
"name": "typescript-plugin-tw-template"
}
],
- "typeRoots": ["node_modules/@types"]
+ "typeRoots": [
+ "node_modules/@types"
+ ]
},
"include": [
"./resources/scripts/**/*"
diff --git a/webpack.config.js b/webpack.config.js
index 492c74bf9..ec81a8860 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -63,6 +63,7 @@ module.exports = {
extensions: ['.ts', '.tsx', '.js', '.json'],
alias: {
'@': path.join(__dirname, '/resources/scripts'),
+ '@feature': path.join(__dirname, '/resources/scripts/components/server/features'),
},
symlinks: false,
},