diff --git a/zero.Web.UI/App/components/buttons/select-button.vue b/zero.Web.UI/App/components/buttons/select-button.vue index aaba2b79..e095ee5d 100644 --- a/zero.Web.UI/App/components/buttons/select-button.vue +++ b/zero.Web.UI/App/components/buttons/select-button.vue @@ -16,7 +16,7 @@ diff --git a/zero.Web.UI/App/pages/media/detail.vue b/zero.Web.UI/App/pages/media/detail.vue index c09fdb2a..17db9679 100644 --- a/zero.Web.UI/App/pages/media/detail.vue +++ b/zero.Web.UI/App/pages/media/detail.vue @@ -32,8 +32,8 @@ + + \ No newline at end of file diff --git a/zero.Web.UI/package.json b/zero.Web.UI/package.json index 83a310e1..cba1d1f2 100644 --- a/zero.Web.UI/package.json +++ b/zero.Web.UI/package.json @@ -3,32 +3,23 @@ "version": "0.1.0", "private": true, "scripts": { - "install": "", - "zero": "node zero.run.js", - "serve": "vue-cli-service serve", - "build": "vue-cli-service build", - "build-dev": "vue-cli-service build --mode development", - "watch": "vue-cli-service build --mode development --watch" + "dev": "vite", + "build": "vite build" }, "dependencies": { - "core-js": "^3.6.5", - "axios": "^0.19.2", + "axios": "^0.21.0", "dayjs": "^1.8.26", "flatpickr": "^4.6.3", - "lodash": "*", + "qs": "^6.9.4", "sortablejs": "^1.10.2", "underscore": "^1.10.2", - "vue": "^2.6.11", - "vue-router": "^3.2.0" + "vue": "^2.6.12", + "vue-router": "^3.4.8" }, "devDependencies": { - "@vue/cli-plugin-babel": "~4.5.0", - "@vue/cli-plugin-router": "~4.5.0", - "@vue/cli-service": "~4.5.0", - "npm-cmd": "^0.2.0", "sass": "^1.26.5", - "sass-loader": "^8.0.2", - "syncpack": "^5.6.10", - "vue-template-compiler": "^2.6.11" + "vite": "^1.0.0-rc.8", + "vite-plugin-vue2": "^0.2.1", + "vue-template-compiler": "^2.6.12" } } diff --git a/zero.Web.UI/vite.config.js b/zero.Web.UI/vite.config.js new file mode 100644 index 00000000..952fef80 --- /dev/null +++ b/zero.Web.UI/vite.config.js @@ -0,0 +1,50 @@ +const path = require('path'); +const { createVuePlugin } = require('vite-plugin-vue2'); + +let zeroPlugins = []; +//if (process.env.ZERO_PLUGINS) +//{ +// let plugins = JSON.parse(process.env.ZERO_PLUGINS); + +// plugins.forEach(plugin => +// { +// const pluginConfig = require(plugin.path); + +// if (pluginConfig != null) +// { +// zeroPlugins.push(pluginConfig()); +// } +// }); +//} + +const aliasResolver = { + alias(id) + { + if (id.indexOf('zero/') === 0 || id.indexOf('shop/') === 0) + { + return '/@' + id; + } + } + //requestToFile(publicPath, root) + //{ + // if (publicPath.indexOf('/@zero/') === 0) + // { + // return path.join(root, publicPath.replace('/@zero/', '')); + // } + // if (publicPath.indexOf('/@shop/') === 0) + // { + // return path.join(root, publicPath.replace('/@shop/', '../zero.Commerce/Plugins/zero.Commerce/')); + // } + //} +}; + +export default { + port: process.env.PORT, + cors: true, + emitManifest: true, + plugins: [createVuePlugin(), ...zeroPlugins], + alias: { + '/@zero/': path.resolve(__dirname, 'app/') + }, + resolvers: [aliasResolver] +} \ No newline at end of file