Przeglądaj źródła

update meta to plugin v4

Yuki Takei 4 lat temu
rodzic
commit
77ad8c9afc

+ 4 - 4
packages/plugin-attachment-refs/src/meta.js

@@ -1,11 +1,11 @@
-const path = require('path');
+const isProd = process.env.NODE_ENV === 'production';
 
 module.exports = {
-  pluginSchemaVersion: 3,
+  pluginSchemaVersion: 4,
   serverEntries: [
-    path.join(__dirname, 'server-entry.js'),
+    isProd ? 'dist/cjs/server-entry.js' : 'src/server-entry.js',
   ],
   clientEntries: [
-    path.join(__dirname, 'client-entry.js'),
+    'src/client-entry.js',
   ],
 };

+ 4 - 4
packages/plugin-lsx/src/meta.js

@@ -1,11 +1,11 @@
-const path = require('path');
+const isProd = process.env.NODE_ENV === 'production';
 
 module.exports = {
-  pluginSchemaVersion: 3,
+  pluginSchemaVersion: 4,
   serverEntries: [
-    path.join(__dirname, 'server-entry.js'),
+    isProd ? 'dist/cjs/server-entry.js' : 'src/server-entry.js',
   ],
   clientEntries: [
-    path.join(__dirname, 'client-entry.js'),
+    'src/client-entry.js',
   ],
 };

+ 2 - 4
packages/plugin-pukiwiki-like-linker/src/meta.js

@@ -1,10 +1,8 @@
-const path = require('path');
-
 module.exports = {
-  pluginSchemaVersion: 3,
+  pluginSchemaVersion: 4,
   serverEntries: [
   ],
   clientEntries: [
-    path.join(__dirname, 'client-entry.js'),
+    'src/client-entry.js',
   ],
 };