mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-03-19 15:01:06 +08:00
fix: Fix plugins in build.
This commit is contained in:
parent
6f3a5021fb
commit
ec8d5ca6ad
@ -66,7 +66,8 @@ async function generateDefaultTypesMap() {
|
||||
await Promise.all(
|
||||
defaultPackages.map(async (packageName) => {
|
||||
const { default: types } = await import(`${packageName}/types`);
|
||||
const version = packageFile.devDependencies[packageName];
|
||||
const version =
|
||||
packageFile.devDependencies[packageName] || packageFile.dependencies[packageName];
|
||||
createPluginTypesMap({
|
||||
packageTypes: types,
|
||||
typesMap: defaultTypesMap,
|
||||
|
@ -19,7 +19,8 @@ import path from 'path';
|
||||
import yargs from 'yargs';
|
||||
import { hideBin } from 'yargs/helpers';
|
||||
|
||||
import build, { createCustomPluginTypesMap } from '@lowdefy/build';
|
||||
import build from '@lowdefy/build';
|
||||
import createCustomPluginTypesMap from './createCustomPluginTypesMap.mjs';
|
||||
|
||||
const argv = yargs(hideBin(process.argv)).argv;
|
||||
|
||||
|
@ -30,7 +30,7 @@ async function getPluginDefinitions({ directories }) {
|
||||
return get(lowdefy, 'plugins', { default: [] });
|
||||
}
|
||||
|
||||
async function createCustomTypesMap({ directories }) {
|
||||
async function createCustomPluginTypesMap({ directories }) {
|
||||
const customTypesMap = {
|
||||
actions: {},
|
||||
blocks: {},
|
||||
@ -63,4 +63,4 @@ async function createCustomTypesMap({ directories }) {
|
||||
return customTypesMap;
|
||||
}
|
||||
|
||||
export default createCustomTypesMap;
|
||||
export default createCustomPluginTypesMap;
|
Loading…
x
Reference in New Issue
Block a user