@lifetechocms/react 0.1.5 → 0.1.6
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 +1 -1
- package/vite/index.js +28 -0
package/package.json
CHANGED
package/vite/index.js
CHANGED
|
@@ -64,12 +64,40 @@ export default function lifetechReact(options = {}) {
|
|
|
64
64
|
'LifeTechOCMS: Provide a valid themeName in Vite configuration.'
|
|
65
65
|
);
|
|
66
66
|
}
|
|
67
|
+
/*
|
|
67
68
|
// Activate LifeTech generation only during lt-export.
|
|
68
69
|
if (process.env.LIFETECH_BUILD !== 'true') {
|
|
69
70
|
return {
|
|
70
71
|
name: 'lifetechocms-react'
|
|
71
72
|
};
|
|
72
73
|
}
|
|
74
|
+
*/
|
|
75
|
+
|
|
76
|
+
// Directories generated by the LifeTechOCMS exporter.
|
|
77
|
+
// Exclude them from the Vite development file watcher.
|
|
78
|
+
const ignoredExportDirectories = [
|
|
79
|
+
'**/lt-exports/**',
|
|
80
|
+
'**/dist-lifetech/**'
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
// Activate LifeTech generation only during lt-export.
|
|
84
|
+
if (process.env.LIFETECH_BUILD !== 'true') {
|
|
85
|
+
return {
|
|
86
|
+
name: 'lifetechocms-react',
|
|
87
|
+
|
|
88
|
+
config() {
|
|
89
|
+
return {
|
|
90
|
+
server: {
|
|
91
|
+
watch: {
|
|
92
|
+
ignored: ignoredExportDirectories
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
73
101
|
// 2. Virtual module identifiers
|
|
74
102
|
const viewsVirtualId = 'virtual:lifetech-views';
|
|
75
103
|
const resolvedViewsId = '\0' + viewsVirtualId;
|