Skip to content
A package to help with webpacking NativeScript apps.
Branch: master
Clone or download
DimitarTachev Merge pull request #936 from NativeScript/tachev/preview-ios-inspector
fix: do not add inspector_modules entry when core modules are an external module
Latest commit fc4e415 Jun 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github chore: unify issue templates (#686) Oct 8, 2018
.vscode refactor: add VSCode debug configuration for tests Aug 23, 2018
bin refactor: use webpack context when notifying CLI for changed files (#455 Mar 10, 2018
build chore(prepublish): change script name; accepts --distTag option (#662) ( Sep 17, 2018
demo
hmr refactor(HMR): print caught error's message (#760) Jan 9, 2019
host chore: merge release in master (#804) Feb 20, 2019
jasmine-config fix: project's package.json indentation is not persisted (#727) Dec 10, 2018
lib chore: merge release into master (#880) May 7, 2019
nativescript-target refactor(nativescript-target): add main template runtime for hot upda… Sep 5, 2018
plugins fix: handle file dependencies in non root entry modules (e.g. tns_mod… Jun 6, 2019
snapshot/android fix: clean up snpashot tool on download fail (#893) May 20, 2019
templates fix: do not add inspector_modules entry when core modules are an exte… Jun 13, 2019
transformers fix: import the workaroundResolve funciton based on the Angular versi… May 22, 2019
utils
verify refactor: remove the vendor.ts/js files May 3, 2018
.gitignore fix(angular): support angular lazy routes in preview (#753) Dec 21, 2018
.npmignore chore: filter some files from npm package (#728) Dec 7, 2018
CHANGELOG.md release: cut the 0.24.1 release (#930) Jun 6, 2019
CODE_OF_CONDUCT.md docs: update LICENSE and CODE_OF_CONDUCT.md (#407) Jan 23, 2018
CONTRIBUTING.md docs: update release schema Mar 15, 2019
LICENSE chore: update community files (#761) Jan 7, 2019
PULL_REQUEST_TESTS.md Update PULL_REQUEST_TESTS.md (#185) Jun 9, 2017
README.md docs: forums to Stack Overflow (#652) Sep 28, 2018
android-app-components-loader.js fix: typescript source maps are containing javascript code (#857) Apr 12, 2019
androidProjectHelpers.js feat(snapshot): The parameters passed to mksnapshot are now retrieved… ( Feb 6, 2019
apply-css-loader.js fix: typescript source maps are containing javascript code (#857) Apr 12, 2019
bundle-config-loader.js fix: typescript source maps are containing javascript code (#857) Apr 12, 2019
css2json-loader.js fix: typescript source maps are containing javascript code (#857) Apr 12, 2019
dependencyManager.js Merge branch 'master' into tachev/fix-custom-entry-points May 30, 2019
hot-loader-helper.js refactor(HMR): rename module to path in context object (#787) Feb 4, 2019
hot.js refactor(HMR): print caught error's message (#760) Jan 9, 2019
index.js feat: support hidden source maps to map error stack traces from crash… Apr 10, 2019
index.spec.ts chore: entryPath check should work on Windows (#838) Mar 20, 2019
installer.js refactor: remove the vendor.ts/js files May 3, 2018
lazy-ngmodule-hot-loader.js fix: lazy-ngmodule-hot-loader breaks the sourceMaps (#770) Jan 25, 2019
load-application-css-angular.js fix(AoT): stop using require.context in Angular apps (#574) Jun 22, 2018
load-application-css-regular.js fix(AoT): stop using require.context in Angular apps (#574) Jun 22, 2018
load-application-css.js fix(AoT): stop using require.context in Angular apps (#574) Jun 22, 2018
markup-hot-loader.js fix: typescript source maps are containing javascript code (#857) Apr 12, 2019
merge-guidance-schema.png docs: update release schema Mar 15, 2019
moduleid-compat-loader.js refactor: Refactor moduleId: __filename to moduleId: module.id, imple… Dec 12, 2017
package.json chore: bump version to 0.25.0 (#915) May 30, 2019
postinstall.js Compare webpack.config files (#485) Apr 5, 2018
projectFilesManager.js feat: add Vue bundling support (#676) Sep 28, 2018
projectHelpers.js fix: import the workaroundResolve funciton based on the Angular versi… May 22, 2019
projectHelpers.spec.js fix(Angular): add hot loader for lazy loaded NgModules (#747) Dec 18, 2018
release-contribution-guide-schema-webpack.png docs: update release schema Mar 15, 2019
script-hot-loader.js fix: typescript source maps are containing javascript code (#857) Apr 12, 2019
style-hot-loader.js fix: typescript source maps are containing javascript code (#857) Apr 12, 2019
tsconfig.json refactor: simplify TS configuration Aug 23, 2018
unit-testing-config-loader.js chore: merge release into master (#852) Apr 8, 2019
xml-namespace-loader.js fix: typescript source maps are containing javascript code (#857) Apr 12, 2019

README.md

NativeScript Webpack

This repository contains the code for the nativescript-dev-webpack plugin which helps in webpacking NativeScript apps.

JavaScript code and general asset bundling have been a member of the web developer toolbox for a long time. Tools like Webpack have been providing support for an enjoyable development experience that lets you assemble client-side code from various module sources and formats and then package it together. Most importantly, they allow for page load time optimizations that reduce or parallelize the number of requests a browser makes to the server.

Why bundle scripts in a mobile app though?

  • Fewer filesystem operations on app startup
  • Smaller code size
  • Tree-shaking
  • Preprocessing and interoperability hooks. Webpack provides a way to resolve modules and expressions differently according to its configuration. It also contains a lot of plugins and loaders that let you embed different content in your application or use code written in different programming languages

For more details, see the NativeScript docs for building with webpack.

Ingredients

  • webpack config templates.
  • helper functions that place files at the correct locations before packaging apps.
  • loaders and plugins for vanilla NativeScript and Angular apps.

Usage

$ npm install --save-dev nativescript-dev-webpack

$ tns run android --bundle
or
$ tns run ios --bundle

Contribute

We love PRs! Check out the contributing guidelines and instructions for local setup. If you want to contribute, but you are not sure where to start - look for issues labeled help wanted.

Get Help

Please, use github issues strictly for reporting bugs or requesting features. For general questions and support, check out Stack Overflow or ask our experts in NativeScript community Slack channel.

You can’t perform that action at this time.