Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

H5打包发布后报错 lib_library is not defined #1218

Closed
snycloud opened this issue Nov 22, 2018 · 6 comments
Closed

H5打包发布后报错 lib_library is not defined #1218

snycloud opened this issue Nov 22, 2018 · 6 comments
Assignees

Comments

@snycloud
Copy link

问题描述
H5打包发布后报错 lib_library is not defined, 项目无法运行, 所有静态资源network中显示正常

复现步骤
[复现问题的步骤]

  1. npm run build:h5
  2. 将dist完整目录上传至服务器
  3. 打开项目地址(url)

期望行为
H5项目可以正常打包发布

报错信息

Uncaught ReferenceError: lib_library is not defined

(说明: 所有静态资源文件加载正常)

image

系统信息

  • 操作系统: [MacOS 10.14]
  • Taro 版本 [e.g. v.1.1.9]
  • Node.js 版本 [e.g. v10.10.0]
  • 报错平台 [h5]

补充信息
通过官方群众开发的同学帮助解决问题, 导致此问题的原因可能是由于框架的问题导致的,
最后开发的同学给出了一个临时的解决方案, 方案如下:

h5: {
        publicPath: '/front/',
        staticDirectory: 'static',
        **_enableDll: false,   // 临时解决H5打包发布报错 lib_library is not defined 错误_**
        module: {
            postcss: {
                autoprefixer: {
                    enable: true
                }
            }
        }
    }

@taro-bot
Copy link

taro-bot bot commented Nov 22, 2018

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@luckyadam luckyadam added the H5 label Nov 22, 2018
@taro-bot
Copy link

taro-bot bot commented Nov 22, 2018

CC @Littly

@snycloud
Copy link
Author

不知道这个问题是否已经解决了

@Littly
Copy link
Contributor

Littly commented Dec 18, 2018

更新到最新版试试看

@taro-bot
Copy link

taro-bot bot commented Dec 18, 2018

Hello~

您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

@taro-bot taro-bot bot removed the to be closed label Dec 19, 2018
@taro-bot taro-bot bot closed this as completed Dec 19, 2018
@taro-bot
Copy link

taro-bot bot commented Dec 19, 2018

Hello~

您的问题楼上已经有了确切的回答,如果没有更多的问题这个 issue 将在 15 天后被自动关闭。

如果您在这 15 天中更新更多信息自动关闭的流程会自动取消,如有其他问题也可以发起新的 Issue。

Good luck and happy coding~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants