mooho-base-admin-plus 0.1.29 → 0.1.32

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/dist/setting.js CHANGED
@@ -11,7 +11,6 @@ window.setting = {
11
11
  dev: 'http://localhost:34450/',
12
12
  prd: '/'
13
13
  },
14
- routerBase: 'admin',
15
14
  layout: {
16
15
  // 侧边栏风格,可选值为 dark 或 light
17
16
  siderTheme: 'dark',
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "mooho-base-admin-plus",
3
3
  "description": "MOOHO basic framework for admin by Vue3",
4
- "version": "0.1.29",
4
+ "version": "0.1.32",
5
5
  "author": "jinyifan <jinyifan@mooho.com.cn>",
6
6
  "dotnetVersion": "1.3.97",
7
7
  "license": "MIT",
8
8
  "private": false,
9
- "main": "./dist/mooho-base-admin-plus.es.js",
9
+ "main": "./dist/mooho-base-admin-plus.min.js",
10
10
  "scripts": {
11
11
  "dev": "vite --open",
12
12
  "build": "vite build",
package/public/setting.js CHANGED
@@ -11,7 +11,6 @@ window.setting = {
11
11
  dev: 'http://localhost:34450/',
12
12
  prd: '/'
13
13
  },
14
- routerBase: 'admin',
15
14
  layout: {
16
15
  // 侧边栏风格,可选值为 dark 或 light
17
16
  siderTheme: 'dark',
package/src/setting.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * */
4
4
 
5
5
  const env = import.meta.env.NODE_ENV;
6
- const basePath = import.meta.env.VUE_APP_BASE_PATH;
6
+ const basePath = import.meta.env.VITE_APP_BASE_PATH;
7
7
 
8
8
  const Setting = {
9
9
  /**
@@ -192,6 +192,8 @@ const copyTo = (source, target) => {
192
192
 
193
193
  let localSetting = window.setting;
194
194
 
195
+ console.log('localSetting', localSetting);
196
+
195
197
  if (localSetting) {
196
198
  copyTo(localSetting, Setting);
197
199
  }
@@ -1,12 +1,18 @@
1
1
  /**
2
2
  * Admin Plus 开发配置
3
3
  * */
4
+ import { loadEnv } from 'vite';
5
+
6
+ let env = loadEnv(process.env.NODE_ENV, process.cwd());
7
+
8
+ const basePath = env.VITE_APP_BASE_PATH;
9
+ const path = basePath == '' || basePath == null ? '/' : '/' + basePath + '/';
4
10
 
5
11
  const Setting = {
6
12
  // 是否使用 Mock 的数据,默认 开发环境为 true,生产环境为 false
7
13
  // isMock: false,
8
14
  // 部署应用包时的基本 URL
9
- publicPath: '/',
15
+ publicPath: path,
10
16
  // 生产环境构建文件的目录名
11
17
  outputDir: 'dist',
12
18
  // 放置生成的静态资源 (js、css、img、fonts) 的 (相对于 outputDir 的) 目录。
package/vite.config.js CHANGED
@@ -6,6 +6,7 @@ import Setting from './test/setting.env';
6
6
  // https://vitejs.dev/config/
7
7
  export default defineConfig({
8
8
  plugins: [vue()],
9
+ base: Setting.publicPath,
9
10
  target: 'es2015',
10
11
  build: {
11
12
  sourcemap: false, // 输出.map文件
@@ -15,26 +16,26 @@ export default defineConfig({
15
16
  lib: {
16
17
  entry: resolve(__dirname, './src/index.js'),
17
18
  name: 'moohoBaseAdminPlus'
19
+ },
20
+ rollupOptions: {
21
+ context: 'globalThis',
22
+ preserveEntrySignatures: 'strict',
23
+ external: ['vue', 'view-ui-plus'],
24
+ output: [
25
+ {
26
+ format: 'umd',
27
+ exports: 'named',
28
+ sourcemap: false,
29
+ entryFileNames: 'mooho-base-admin-plus.min.js',
30
+ chunkFileNames: '[name].js',
31
+ assetFileNames: '[name].[ext]',
32
+ // namespaceToStringTag: true,
33
+ // inlineDynamicImports: false,
34
+ // manualChunks: undefined,
35
+ globals: { vue: 'Vue', 'view-ui-plus': 'viewUiPlus' }
36
+ }
37
+ ]
18
38
  }
19
- // rollupOptions: {
20
- // context: 'globalThis',
21
- // preserveEntrySignatures: 'strict',
22
- // external: ['vue', 'view-ui-plus'],
23
- // output: [
24
- // {
25
- // format: 'umd',
26
- // exports: 'named',
27
- // sourcemap: false,
28
- // entryFileNames: 'mooho-base-admin-plus.min.js',
29
- // chunkFileNames: '[name].js',
30
- // assetFileNames: '[name].[ext]',
31
- // // namespaceToStringTag: true,
32
- // // inlineDynamicImports: false,
33
- // // manualChunks: undefined,
34
- // globals: { vue: 'Vue', 'view-ui-plus': 'viewUiPlus' }
35
- // }
36
- // ]
37
- // }
38
39
  },
39
40
  resolve: {
40
41
  alias: {