NativeScript / NativeScript/nativescript-cli

App not displaying correctly after enabling webpack

未关闭
#4,750 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

question
主要语言
JavaScript
星标
1.1k
派生
204
平均合并
1 天 9 小时
30 天内合并 PR
8

描述

Hi there,

Context: I was using NS CLI 5.2.4 (or 5.2.3 I think) up until last night and my app was running fine. At some point the iOS version started crashing after I installed two plugins. Removing those plugins never resolved the issue.

I decided to update my project to CLI 5.4.2 which uses Webpack, seeing as NS 6 will require it anyway. I updated my app and installed uglifyjs-webpack-plugin as a devDependency after the console moaning about it and failing my builds.

Since then, my app builds fine on both iOS and Android, but the CSS is not applied so it all looks terrible. No fonts are applied, no CSS styles, nothing.

Is there anything I missed when installing the uglify plugin? Will there be a need for this plugin from NS6 onwards?

How do I code and set up my project for webpack/bundle if I've never used it before?

Thanks
Nick

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

在启用 webpack 并安装 uglifyjs-webpack-plugin 后,使用 NativeScript CLI 5.4.2 重现该问题,然后检查构建输出,以 выяс明为什么 iOS 和 Android 上缺少 CSS 和字体。完成的标准是应用能够构建,并应用其样式和字体,同时明确插件要求和 webpack 设置。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, webpack
领域
build-system, cli, mobile-dev
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。