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 摘要。