O'Reilly logo

NativeScript for Angular Mobile Development by Nathanael J. Anderson, Nathan Walker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Detour – Overview of developing a webpack plugin

We now want to return to the first error we encountered when bundling our app which was:

  • ERROR in Unexpected value SlimSliderDirective in /path/to/TNSStudio/app/modules/player/directives/slider.directive.d.ts declared by the module PlayerModule in /path/to/TNSStudio/app/modules/player/player.module.ts. Please add a @Pipe/@Directive/@Component annotation.

A solution for this error did not exist at the time of writing this book, so we created the nativescript-webpack-import-replace (https://github.com/NathanWalker/nativescript-webpack-import-replace) plugin to solve the problem.

Developing a webpack plugin in detail is out of the scope of this book, but we wanted to give you some highlights ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required