diff --git a/.gitignore b/.gitignore
index 64596a30..587b4d29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -275,4 +275,5 @@ zero.Stories/
zero.Forms/
zero.Web.UI/package.json
zero.Web.UI/package-lock.json
-zero.Web.UI/app/core/plugins.js
\ No newline at end of file
+zero.Web.UI/app/core/plugins.js
+zero.Web.UI/dist
diff --git a/zero.Web.UI/vite.config.js b/zero.Web.UI/vite.config.js
index 289d61d2..49395d74 100644
--- a/zero.Web.UI/vite.config.js
+++ b/zero.Web.UI/vite.config.js
@@ -2,7 +2,14 @@ const path = require('path');
const fs = require('fs');
const { createVuePlugin } = require('vite-plugin-vue2');
-let loadedPlugins = JSON.parse(process.env.ZERO_PLUGINS || "[]"); //["../zero.Commerce/Plugin", "../../Laola/Laola.Backoffice/Plugin"];
+let loadedPlugins = JSON.parse(process.env.ZERO_PLUGINS || "[]");
+
+
+if (!process.env.ZERO_PLUGINS)
+{
+ loadedPlugins = ["../zero.Commerce/Plugin", "../zero.Stories/Plugin", "../zero.Forms/Plugin", "../../Laola/Laola.Backoffice/Plugin"];
+}
+
let zeroPlugins = [];
let pluginFileContent = '';
@@ -45,7 +52,10 @@ fs.writeFile(path.resolve(__dirname, 'app/core/plugins.js'), pluginFileContent,
//file written successfully
})
-const config = {
+/**
+ * @type {import('vite').UserConfig}
+ */
+let config = {
server: {
port: process.env.PORT,
cors: true
@@ -59,15 +69,30 @@ const config = {
'tiptap': 'tiptap/dist/tiptap.esm.js'
},
build: {
- manifest: false,
- rollupOptions: {
- format: 'cjs',
- entryFileNames: `[name].js`,
- chunkFileNames: `[name].js`,
- assetFileNames: `[name].[ext]`
+ manifest: true,
+ outDir: 'dist/zero',
+ minify: false,
+ terserOptions: {
+ compress: false
},
-
+ rollupOptions: {
+ output: {
+ format: 'es',
+ entryFileNames: `[name].js`,
+ chunkFileNames: `[name].js`,
+ assetFileNames: `[name].[ext]`
+ }
+ }
}
};
+if (process.env.NODE_ENV === 'production')
+{
+ config.base = '/zero/';
+ config.alias.tiptap = 'node_modules/tiptap/dist/tiptap.esm.js';
+ config.alias.underscore = 'node_modules/underscore/underscore-esm.js';
+ config.alias.axios = 'node_modules/axios/dist/axios.js';
+ config.alias.dayjs = 'node_modules/dayjs/esm/index.js';
+}
+
export default config;
\ No newline at end of file
diff --git a/zero.Web/Views/Zero/Index.cshtml b/zero.Web/Views/Zero/Index.cshtml
index ca5df518..da6c8558 100644
--- a/zero.Web/Views/Zero/Index.cshtml
+++ b/zero.Web/Views/Zero/Index.cshtml
@@ -18,7 +18,9 @@