Coder Social home page Coder Social logo

Comments (12)

github-actions avatar github-actions commented on June 2, 2024

👍 Thanks for this!
🏷 I have applied any labels matching special text in your issue.

Please review the labels and make any necessary changes.

from amis.

2betop avatar 2betop commented on June 2, 2024

不编译 jssdk 不需要 fis

from amis.

THCloud avatar THCloud commented on June 2, 2024

不用fis怎么编译呢?我看整个项目的打包流程用的都是fis conf

from amis.

THCloud avatar THCloud commented on June 2, 2024

意思是需要把整个打包流程改一遍吗,去掉fis的依赖?

from amis.

lqPrototype avatar lqPrototype commented on June 2, 2024

意思是需要把整个打包流程改一遍吗,去掉fis的依赖?

https://fex-team.github.io/fis3/docs/beginning/install.html fis官网有对node版本要求,建议你用nvm:v17.4.0。如果打包esm/lib 不需要使用fis,它是使用rollup打包的。打包sdk才会使用到fis(/packages/amis/build.sh)

from amis.

THCloud avatar THCloud commented on June 2, 2024

意思是需要把整个打包流程改一遍吗,去掉fis的依赖?

https://fex-team.github.io/fis3/docs/beginning/install.html fis官网有对node版本要求,建议你用nvm:v17.4.0。如果打包esm/lib 不需要使用fis,它是使用rollup打包的。打包sdk才会使用到fis(/packages/amis/build.sh)

说的该不会是这个吧😭😭

#!/bin/bash
#./node_modules/fis3/bin/fis.js release gh-pages -c
rm -rf public
./node_modules/fis3/bin/fis.js release public -c
./node_modules/fis3/bin/fis.js release gh-pages -c

from amis.

THCloud avatar THCloud commented on June 2, 2024

意思是需要把整个打包流程改一遍吗,去掉fis的依赖?

https://fex-team.github.io/fis3/docs/beginning/install.html fis官网有对node版本要求,建议你用nvm:v17.4.0。如果打包esm/lib 不需要使用fis,它是使用rollup打包的。打包sdk才会使用到fis(/packages/amis/build.sh)

另外多问下用nvm本质不也是维护多套nodejs环境吗?这样我还是要持续保留一个低版本的node环境用于fis的运行?

from amis.

2betop avatar 2betop commented on June 2, 2024

关键是你要不要编译 jssdk,如果你通过 npm 引用 amis 使用,可以自己把编译 jssdk 部分的逻辑干掉,就可以不依赖 fis 了

from amis.

THCloud avatar THCloud commented on June 2, 2024

不编译 jssdk 不需要 fis

这里的编译jssdk,包括编译react,echarts那些吗,还是仅仅说import了fis的地方?
项目里有很多用react的地方,但除了构建以外没有单独引用fis module的地方

(而且我对fis的认知还是个跟gulp等价的东西,fis应该只是构建用的吧)

from amis.

2betop avatar 2betop commented on June 2, 2024

https://aisuda.bce.baidu.com/amis/zh-CN/docs/start/getting-started
amis 有两种用法,如果是第二种用法,不需要 fis

from amis.

THCloud avatar THCloud commented on June 2, 2024

简单看了下项目大多的函数是 schema2component,schema就是amis各组件对应的json配置,schema2component实现是转成react的component

import * as React from 'react';
import {
    render as renderSchema
} from 'amis';
import { getEnv } from 'mobx-state-tree';
import { inject, observer } from 'mobx-react';
import { withRouter, RouteComponentProps } from 'react-router';
import * as qs from 'qs';
import { Action } from 'amis/lib/types';

interface RendererProps {
    schema?:any;
    [propName:string]:any;
};

@inject("store")
@withRouter
@observer
export default class AMisRenderer extends React.Component<RendererProps> {

这样看起来对应第二种?那应该就是把打包过程用webpack重做一遍可以解决?

from amis.

2betop avatar 2betop commented on June 2, 2024

是第二种, 把这一段逻辑去掉即可 https://github.com/baidu/amis/blob/master/packages/amis/build.sh#L22-L24

from amis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.