如何解决模具配置生成无法独立运行的dist文件
我已经开始模具开发,并试图从中创建问候世界,但是在尝试单独构建,部署和使用它时,dist文件正在生成一些似乎无法独立运行的随机文件。
我已将文件发布到npm,并尝试在html文件中独立运行。使用unpkg https://unpkg.com/browse/rahulrsingh09-stenciltest2@0.0.2/dist/
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<my-component first="FF" last="'Don't call me a framework' JS"></my-component>
<script src='https://unpkg.com/rahulrsingh09-stenciltest2@0.0.2/dist/index.js'></script>
</body>
</html>
这是来自我在npm中发现的另一个软件包的测试,这似乎可行。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<meta name="author" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width,initial-scale=1">
</head>
<body>
<my-component first="FF" last="'Don't call me a framework' JS"></my-component>
<script src='https://unpkg.com/web-component-stencil-test@0.0.1/dist/test.js'></script>
</body>
</html>
我发现的唯一区别是https://unpkg.com/browse/web-component-stencil-test@0.0.1/dist/
dist包含项目主体的根文件,该文件可以独立运行,但不会在新的模具配置版本中生成。有关此文档的文档非常稀疏,能否有人指出我在做什么错..在这里或模具缺少的内容。
package.json
"name": "stenciltest2","version": "0.0.2","description": "Stencil Component Starter","main": "dist/index.cjs.js","module": "dist/custom-elements/index.js","es2015": "dist/esm/index.mjs","es2017": "dist/esm/index.mjs","types": "dist/custom-elements/index.d.ts","collection": "dist/collection/collection-manifest.json","collection:main": "dist/collection/index.js","unpkg": "dist/test/test.js","files": [
"dist/","loader/"
],
模具配置
import { Config } from '@stencil/core';
export const config: Config = {
namespace: 'test',buildEs5: true,outputTargets: [
{
type: 'dist',esmLoaderPath: '../loader',},{
type: 'dist-custom-elements-bundle',{
type: 'docs-readme',{
type: 'www',serviceWorker: null,// disable service workers
},]
};
解决方法
您是说没有http服务器的“独立”吗?
如果是这样,那么这就是Ionic团队所说的“投降者”。
PROCEDURE SP_ERROR_INS_ERR_COMMON (n_ERR_CODE NUMBER,c_ERR_SOURCE VARCHAR2,n_ERR_LINE NUMBER,c_ERR_DESC VARCHAR2,C_USER_COMMENT VARCHAR2 ) IS
n_Log_Id NUMBER;
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
n_Log_Id := 0;
INSERT INTO ERROR_LOG_COMMON
(ERROR_CODE,ERROR_SOURCE,ERROR_LINE,ERROR_DESCRIPTION,USER_COMMENT)
VALUES
(n_ERR_CODE,c_ERR_SOURCE,n_ERR_LINE,c_ERR_DESC,C_USER_COMMENT
);
COMMIT;
raise_application_error( -20001,SUBSTR(SQLERRM,1,200));
END SP_ERROR_INS_ERR_COMMON;
您需要在 EXCEPTION
WHEN OTHERS
THEN
vn_errcode := SQLCODE;
vc_errmsg := SUBSTR (SQLERRM,4000);
sp_error_ins_err_common(vn_ErrCode,'SP_RP_DIM_COMPARE',NULL,vc_ErrMsg,substr('batch_id ' || g_BATCH_ID ||
l_str_err_msg,4000) );
RAISE;
中设置stencil build --prerender
。
baseUrl
请参阅:
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。