Skip to content

使用components遇到问题,页面报错:没有require定义 #32

@ilife5

Description

@ilife5

我的使用方式如下。

目录结构

├── components
│   └── zepto
│       ├── README.md
│       ├── ajax.js
│       ├── assets.js
│       ├── callbacks.js
│       ├── component.json
│       ├── data.js
│       ├── deferred.js
│       ├── detect.js
│       ├── event.js
│       ├── form.js
│       ├── fx.js
│       ├── fx_methods.js
│       ├── gesture.js
│       ├── ie.js
│       ├── ios3.js
│       ├── main.js
│       ├── selector.js
│       ├── stack.js
│       ├── touch.js
│       └── zepto.js
├── fis-conf.js
└── src
    ├── html
    │   └── helloworld.html
    ├── scripts
    │   ├── biz
    │   │   └── helloworld
    │   │       └── helloworld.js
    │   └── common
    │       └── common.js
    └── styles

helloworld.html中的内容为:

<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>

<script src="../scripts/common/common.js"></script>
<script src="../scripts/biz/helloworld/helloworld.js"></script>
</body>
</html>

common.js中的内容为:

require("zepto");

helloworld.js中的内容为:

console.log("hello world")

运行fis server start; fis release;之后,打开:http://127.0.0.1:8080/src/html/helloworld.html,报错

image

请问是不是我用的方式有问题?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions