@@ -12,8 +12,8 @@ const CopyWebpackPlugin = require("copy-webpack-plugin");
1212const { BundleAnalyzerPlugin } = require ( "webpack-bundle-analyzer" ) ;
1313const { NativeScriptWorkerPlugin } = require ( "nativescript-worker-loader/NativeScriptWorkerPlugin" ) ;
1414const UglifyJsPlugin = require ( "uglifyjs-webpack-plugin" ) ;
15- const { AngularCompilerPlugin } = require ( "@ngtools/ webpack" ) ;
16- const hashSalt = Date . now ( ) . toString ( ) ;
15+ const { getAngularCompilerPlugin } = require ( "nativescript-dev- webpack/plugins/NativeScriptAngularCompilerPlugin " ) ;
16+ const hashSalt = Date . now ( ) . toString ( ) ;
1717
1818module . exports = env => {
1919 // Add your custom Activities, Services and other Android app components here.
@@ -27,6 +27,7 @@ module.exports = env => {
2727 throw new Error ( "You need to provide a target platform!" ) ;
2828 }
2929
30+ const AngularCompilerPlugin = getAngularCompilerPlugin ( platform ) ;
3031 const projectRoot = __dirname ;
3132
3233 // Default destination inside platforms/<platform>/...
@@ -54,7 +55,7 @@ module.exports = env => {
5455 const appFullPath = resolve ( projectRoot , appPath ) ;
5556 const appResourcesFullPath = resolve ( projectRoot , appResourcesPath ) ;
5657 const tsConfigName = "tsconfig.tns.json" ;
57- const entryModule = `${ nsWebpack . getEntryModule ( appFullPath ) } .ts` ;
58+ const entryModule = `${ nsWebpack . getEntryModule ( appFullPath , platform ) } .ts` ;
5859 const entryPath = `.${ sep } ${ entryModule } ` ;
5960 const entries = { bundle : entryPath } ;
6061 if ( platform === "ios" ) {
@@ -261,10 +262,10 @@ module.exports = env => {
261262 // configures the WebPack runtime to be generated inside the snapshot
262263 // module and no `runtime.js` module exist.
263264 ( snapshot ? [ ] : [ "./runtime" ] )
264- . concat ( [
265- "./vendor" ,
266- "./bundle" ,
267- ] )
265+ . concat ( [
266+ "./vendor" ,
267+ "./bundle" ,
268+ ] )
268269 ) ,
269270 // For instructions on how to set up workers with webpack
270271 // check out https://github.com/nativescript/worker-loader
0 commit comments