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

Solution #4 and #5: Can't resolve './app.css'

Consider the 4th and 5th errors mentioned in the Preparing to use webpack section:

4. ERROR in Entry module not found: Error: Can't resolve './app.css' in '/path/to/TNSStudio/app'5. ERROR in [copy-webpack-plugin] unable to locate 'app.css' at '/path/to/TNSStudio/app/app.css'

The solution to the preceding error is actually related to the fact that we are using platform-specific .ios.css and .android.css, which is compiled via SASS. We need to update our webpack config so that it knows this. Open webpack.config.js, which the plugin added for us automatically, and make the following changes:

module.exports = env => {  const platform = getPlatform(env); // Default destination inside platforms/<platform>/... ...

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