@shijiu/jsview-vue 1.9.631 → 1.9.633

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/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "./dom/*.js",
8
8
  "./loader/*.js"
9
9
  ],
10
- "version": "1.9.631",
10
+ "version": "1.9.633",
11
11
  "bin": {
12
12
  "jsview-post-build": "./scripts/jsview-post-build.js",
13
13
  "jsview-post-install": "./scripts/jsview-post-install.js",
@@ -2904,7 +2904,8 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
2904
2904
  // JsView Modified >>>
2905
2905
  // if ((process.env.NODE_ENV !== 'production') && warnMissing && !res) {
2906
2906
  // 避免掉jsv自定义 element的报错问题
2907
- if ((process.env.NODE_ENV !== 'production') && warnMissing && !res && !name.startsWith("jsve-")) {
2907
+ if ((process.env.NODE_ENV !== 'production') && warnMissing && !res
2908
+ && !name.startsWith("jsve-") && !name.startsWith("fdiv")) {
2908
2909
  // JsView Modified <<<
2909
2910
  const extra = type === COMPONENTS
2910
2911
  ? `\nIf this is a native custom element, make sure to exclude it from ` +
@@ -40741,7 +40741,10 @@ function preload(baseModule, deps, importerUrl) {
40741
40741
  function buildImportAnalysisPlugin(config) {
40742
40742
  const ssr = !!config.build.ssr;
40743
40743
  const isWorker = config.isWorker;
40744
- const insertPreload = false && !(ssr || !!config.build.lib || isWorker); // JsView Modified
40744
+ // JsView Modified >>>
40745
+ // const insertPreload = !(ssr || !!config.build.lib || isWorker);
40746
+ const insertPreload = false;
40747
+ // JsView Modified <<<
40745
40748
  const relativePreloadUrls = config.base === './' || config.base === '';
40746
40749
  const scriptRel = config.build.polyfillModulePreload
40747
40750
  ? `'modulepreload'`
@@ -62581,6 +62584,15 @@ async function resolveConfig(inlineConfig, command, defaultMode = 'development')
62581
62584
  configFileDependencies = loadResult.dependencies;
62582
62585
  }
62583
62586
  }
62587
+
62588
+ // JsView Added >>>
62589
+ const jsviewViteConfigPath = path.resolve(__dirname, '..', 'jsview.vite.config.js');
62590
+ const jsviewViteConfig = (await import(jsviewViteConfigPath));
62591
+ if (jsviewViteConfig) {
62592
+ config = mergeConfig(jsviewViteConfig.default, config);
62593
+ }
62594
+ // JsView Added <<<
62595
+
62584
62596
  // Define logger
62585
62597
  const logger = createLogger(config.logLevel, {
62586
62598
  allowClearScreen: config.clearScreen,
@@ -0,0 +1,57 @@
1
+ import { defineConfig } from 'vite'
2
+ import { resolve as pathResolve } from 'path'
3
+ import fullReload from 'vite-plugin-full-reload';
4
+ import vue from '@vitejs/plugin-vue'
5
+
6
+ // https://vitejs.dev/config/
7
+ export default defineConfig({
8
+ assetsInclude: ['**/*.bmp'],
9
+ build: {
10
+ assetsInlineLimit: 0,
11
+ //cssTarget: 'css/', // 未生效
12
+ emptyOutDir: true,
13
+ minify: false,
14
+ polyfillModulePreload: false,
15
+ rollupOptions: {
16
+ output: {
17
+ format: 'esm',
18
+ entryFileNames: 'js/main.jsv.[hash].js',
19
+ //chunkFileNames: 'js/[name].[hash].js',
20
+ chunkFileNames: 'js/chunk.jsv.[hash].js',
21
+ assetFileNames: (chunkInfo) => chunkInfo.name.endsWith('.css')
22
+ ? 'css/[name].[hash].css' : 'assets/[name].[hash].[ext]'
23
+ },
24
+ },
25
+ sourcemap: true,
26
+ target: 'es2017', // 不转译async/await
27
+ },
28
+ optimizeDeps: {
29
+ exclude: ['jsview'],
30
+ },
31
+ plugins: [
32
+ fullReload('node_modules/@shijiu/jsview-vue/**/*'),
33
+ //vue({
34
+ //template: {
35
+ //compilerOptions: {
36
+ //isCustomElement: (tag) => tag === 'fdiv'
37
+ //}
38
+ //}
39
+ //})
40
+ ],
41
+ resolve: {
42
+ alias: {
43
+ 'jsview': pathResolve(process.env.PWD, 'node_modules/@shijiu/jsview-vue'),
44
+ '/js/main.jsv.js': pathResolve(process.env.PWD, 'node_modules/@shijiu/jsview-vue/loader/jsview-main.js'),
45
+ },
46
+ preserveSymlinks: true
47
+ },
48
+ server: {
49
+ host: true,
50
+ open: true,
51
+ watch: {
52
+ ignored: [
53
+ '!**/node_modules/@shijiu/jsview-vue/**',
54
+ ],
55
+ }
56
+ },
57
+ });