{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/nativescript-dev-webpack/issues/672","repository_url":"https://api.github.com/repos/NativeScript/nativescript-dev-webpack","labels_url":"https://api.github.com/repos/NativeScript/nativescript-dev-webpack/issues/672/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/nativescript-dev-webpack/issues/672/comments","events_url":"https://api.github.com/repos/NativeScript/nativescript-dev-webpack/issues/672/events","html_url":"https://github.com/NativeScript/nativescript-dev-webpack/issues/672","id":363541984,"node_id":"MDU6SXNzdWUzNjM1NDE5ODQ=","number":672,"title":"liveSync issue while using platform-specific TypeScript files","user":{"login":"tsonevn","id":17448734,"node_id":"MDQ6VXNlcjE3NDQ4NzM0","avatar_url":"https://avatars3.githubusercontent.com/u/17448734?v=4","gravatar_id":"","url":"https://api.github.com/users/tsonevn","html_url":"https://github.com/tsonevn","followers_url":"https://api.github.com/users/tsonevn/followers","following_url":"https://api.github.com/users/tsonevn/following{/other_user}","gists_url":"https://api.github.com/users/tsonevn/gists{/gist_id}","starred_url":"https://api.github.com/users/tsonevn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tsonevn/subscriptions","organizations_url":"https://api.github.com/users/tsonevn/orgs","repos_url":"https://api.github.com/users/tsonevn/repos","events_url":"https://api.github.com/users/tsonevn/events{/privacy}","received_events_url":"https://api.github.com/users/tsonevn/received_events","type":"User","site_admin":false},"labels":[{"id":349341360,"node_id":"MDU6TGFiZWwzNDkzNDEzNjA=","url":"https://api.github.com/repos/NativeScript/nativescript-dev-webpack/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-09-25T11:58:28Z","updated_at":"2018-10-02T10:57:08Z","closed_at":null,"author_association":"NONE","body":"## Issue Checklist\r\n\r\n- [x] You are submitting: a bug report.\r\n- [x] You verified that this is a real problem by searching the [NativeScript Forum] and the other [issues] in this repo.\r\n- [x] You checked our [demo apps] and the [documentation] for sample usage.\r\n\r\n## Tell us about the problem\r\nThe issue happens while using platform-specific TypeScript files after the first liveSync. The problem can be easily reproduced with the [nativescript-sdk-examples-js](https://github.com/NativeScript/nativescript-sdk-examples-js) while building the  app with the `tns run <platform_name> --bundle` command. After the first build, we should make some change in the code. During the liveSync process the following error will appear:\r\n```\r\n[./ns-ui-widgets-category/placeholder/platform-files/platform-files-page.js] 378 bytes {bundle} [optional] [built]\r\n[./ns-ui-widgets-category/placeholder/platform-files/platform-files-ts-page.ts] 1.04 KiB {bundle} [optional] [built] [failed] [1 error]\r\n    + 767 hidden modules\r\n\r\nWARNING in ./ns-ui-widgets-category/placeholder/platform-files/platform-files-ts-page.ts\r\nModule build failed: Error: Final loader didn't return a Buffer or String\r\n    at runLoaders (/Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/webpack/lib/NormalModule.js:256:7)\r\n    at /Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:370:3\r\n    at iterateNormalLoaders (/Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:211:10)\r\n    at iterateNormalLoaders (/Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:218:10)\r\n    at /Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:233:3\r\n    at context.callback (/Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:111:13)\r\n    at <anonymous>\r\n    at runMicrotasksCallback (internal/process/next_tick.js:121:5)\r\n    at _combinedTickCallback (internal/process/next_tick.js:131:7)\r\n    at process._tickCallback (internal/process/next_tick.js:180:9)\r\n @ . sync (root|page)\\.(xml|css|js|ts|scss)$\r\n @ ./app.ts\r\n\r\nERROR in [at-loader] TS6053: File '/Users/ntsonev/Desktop/nativescript-sdk-examples-js/app/ns-ui-widgets-category/placeholder/platform-files/platform-files-ts-page.ts' not found.\r\nWebpack compilation complete. Watching for file changes.\r\nWebpack build done!\r\n```\r\nWhen we navigate to `app/ns-ui-widgets-category/placeholder/platform-files/platform-files-ts-page` the app will crash with:\r\n```\r\nHook skipped because either bundling or livesync is in progress.\r\nPreparing project...\r\nExecuting before-prepareJSApp hook from /Users/ntsonev/Desktop/nativescript-sdk-examples-js/hooks/before-prepareJSApp/nativescript-dev-webpack.js\r\nProject successfully prepared (Android)\r\nExecuting after-prepare hook from /Users/ntsonev/Desktop/nativescript-sdk-examples-js/hooks/after-prepare/nativescript-dev-webpack.js\r\nSuccessfully transferred bundle.js.\r\nRefreshing application...\r\nSuccessfully synced application org.nativescript.nativescriptsdkexamplesjs on device 84B7N16309001310.\r\n09-25 14:32:33.567 22465 22465 E AndroidRuntime: \tat com.tns.Runtime.callJSMethodNative(Native Method)\r\n09-25 14:32:33.567 22465 22465 E AndroidRuntime: \tat com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)\r\n09-25 14:32:33.567 22465 22465 E AndroidRuntime: \tat com.tns.Runtime.callJSMethodImpl(Runtime.java:996)\r\n09-25 14:32:33.567 22465 22465 E AndroidRuntime: \tat com.tns.Runtime.callJSMethod(Runtime.java:983)\r\n09-25 14:32:33.567 22465 22465 E AndroidRuntime: \tat com.tns.Runtime.callJSMethod(Runtime.java:967)\r\n09-25 14:32:33.567 22465 22465 E AndroidRuntime: \tat com.tns.Runtime.callJSMethod(Runtime.java:959)\r\nSystem.err: com.tns.NativeScriptException: \r\nSystem.err: Calling js method onItemClick failed\r\nSystem.err: \r\nSystem.err: Error: Module build failed: Error: Final loader didn't return a Buffer or String\r\nSystem.err:     at runLoaders (/Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/webpack/lib/NormalModule.js:256:7)\r\nSystem.err:     at /Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:370:3\r\nSystem.err:     at iterateNormalLoaders (/Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:211:10)\r\nSystem.err:     at iterateNormalLoaders (/Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:218:10)\r\nSystem.err:     at /Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:233:3\r\nSystem.err:     at context.callback (/Users/ntsonev/Desktop/nativescript-sdk-examples-js/node_modules/loader-runner/lib/LoaderRunner.js:111:13)\r\nSystem.err:     at <anonymous>\r\nSystem.err:     at runMicrotasksCallback (internal/process/next_tick.js:121:5)\r\nSystem.err:     at _combinedTickCallback (internal/process/next_tick.js:131:7)\r\nSystem.err:     at process._tickCallback (internal/process/next_tick.js:180:9)\r\nSystem.err: File: \"file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/bundle.js, line: 11771, column: 0\r\nSystem.err: \r\nSystem.err: StackTrace: \r\nSystem.err: \tFrame: function:'./ns-ui-widgets-category/placeholder/platform-files/platform-files-ts-page.ts', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/bundle.js', line: 11771, column: 7\r\nSystem.err: \tFrame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/bundle.js', line: 76, column: 30\r\nSystem.err: \tFrame: function:'webpackContext', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/bundle.js', line: 778, column: 15\r\nSystem.err: \tFrame: function:'', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/vendor.js', line: 5961, column: 76\r\nSystem.err: \tFrame: function:'push.../node_modules/tns-core-modules/globals/globals.js.global.loadModule', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/vendor.js', line: 5976, column: 16\r\nSystem.err: \tFrame: function:'', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/vendor.js', line: 12701, column: 23\r\nSystem.err: \tFrame: function:'', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/vendor.js', line: 12723, column: 29\r\nSystem.err: \tFrame: function:'push.../node_modules/tns-core-modules/ui/frame/frame-common.js.FrameBase.navigate', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/vendor.js', line: 20245, column: 30\r\nSystem.err: \tFrame: function:'ListViewLinksModel.viewModel.set', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/bundle.js', line: 979, column: 31\r\nSystem.err: \tFrame: function:'push.../node_modules/tns-core-modules/data/observable/observable.js.Observable.notify', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/vendor.js', line: 3506, column: 32\r\nSystem.err: \tFrame: function:'ItemClickListenerImpl.onItemClick', file:'file:///data/data/org.nativescript.nativescriptsdkexamplesjs/files/app/vendor.js', line: 24951, column: 19\r\nSystem.err: \r\nSystem.err: \tat com.tns.Runtime.callJSMethodNative(Native Method)\r\nSystem.err: \tat com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116)\r\nSystem.err: \tat com.tns.Runtime.callJSMethodImpl(Runtime.java:996)\r\nSystem.err: \tat com.tns.Runtime.callJSMethod(Runtime.java:983)\r\nSystem.err: \tat com.tns.Runtime.callJSMethod(Runtime.java:967)\r\nSystem.err: \tat com.tns.Runtime.callJSMethod(Runtime.java:959)\r\nSystem.err: \tat com.tns.gen.java.lang.Object_vendor_24944_32_ItemClickListenerImpl.onItemClick(Object_vendor_24944_32_ItemClickListenerImpl.java:20)\r\nSystem.err: \tat android.widget.AdapterView.performItemClick(AdapterView.java:318)\r\nSystem.err: \tat android.widget.AbsListView.performItemClick(AbsListView.java:1158)\r\nSystem.err: \tat android.widget.AbsListView$PerformClick.run(AbsListView.java:3127)\r\nSystem.err: \tat android.widget.AbsListView$3.run(AbsListView.java:4042)\r\nSystem.err: \tat android.os.Handler.handleCallback(Handler.java:790)\r\nSystem.err: \tat android.os.Handler.dispatchMessage(Handler.java:99)\r\nSystem.err: \tat android.os.Looper.loop(Looper.java:164)\r\nSystem.err: \tat android.app.ActivityThread.main(ActivityThread.java:6494)\r\nSystem.err: \tat java.lang.reflect.Method.invoke(Native Method)\r\nSystem.err: \tat com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)\r\nSystem.err: \tat com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)\r\n\r\n\r\n```\r\n\r\n## Local environment\r\n\r\n- [x] Node version: `8.9.1`\r\n- [x] NativeScript CLI version : `4.2.4`\r\n\r\n## Project data\r\n\r\n- [x] Platform you are building the app for  Both\r\n- [x] Node dependencies:\r\n```\r\n{\r\n  \"name\": \"nativescript-sdk-examples-js\",\r\n  \"description\": \"NativeScript SDK Examples\",\r\n  \"author\": \"Telerik <support@telerik.com>\",\r\n  \"version\": \"0.1.0\",\r\n  \"homepage\": \"https://github.com/NativeScript/nativescript-sdk-examples-js\",\r\n  \"repository\": {\r\n    \"type\": \"git\",\r\n    \"url\": \"https://github.com/NativeScript/nativescript-sdk-examples-js\"\r\n  },\r\n  \"bugs\": {\r\n    \"url\": \"https://github.com/NativeScript/nativescript-sdk-examples-js/issues\"\r\n  },\r\n  \"keywords\": [\r\n    \"NativeScript\",\r\n    \"JavaScript\",\r\n    \"SDK\",\r\n    \"example\",\r\n    \"documentation\"\r\n  ],\r\n  \"license\": \"Apache-2.0\",\r\n  \"nativescript\": {\r\n    \"id\": \"org.nativescript.nativescriptsdkexamplesjs\",\r\n    \"tns-ios\": {\r\n      \"version\": \"4.2.0\"\r\n    },\r\n    \"tns-android\": {\r\n      \"version\": \"4.2.0\"\r\n    }\r\n  },\r\n  \"dependencies\": {\r\n    \"nativescript-theme-core\": \"~1.0.4\",\r\n    \"tns-core-modules\": \"^4.2.0\"\r\n  },\r\n  \"devDependencies\": {\r\n    \"babel-traverse\": \"6.26.0\",\r\n    \"babel-types\": \"6.26.0\",\r\n    \"babylon\": \"6.18.0\",\r\n    \"chai\": \"^4.1.2\",\r\n    \"clean-webpack-plugin\": \"~0.1.19\",\r\n    \"copy-webpack-plugin\": \"~4.5.1\",\r\n    \"css-loader\": \"~0.28.11\",\r\n    \"eslint\": \"~4.19.0\",\r\n    \"extract-text-webpack-plugin\": \"~3.0.2\",\r\n    \"fs-extra\": \"^0.30.0\",\r\n    \"markdown-snippet-injector\": \"^0.2.0\",\r\n    \"mocha\": \"^5.2.0\",\r\n    \"mocha-junit-reporter\": \"^1.17.0\",\r\n    \"mocha-multi\": \"^1.0.1\",\r\n    \"nativescript-dev-appium\": \"next\",\r\n    \"nativescript-dev-webpack\": \"^0.15.1\",\r\n    \"nativescript-worker-loader\": \"~0.9.0\",\r\n    \"raw-loader\": \"~0.5.1\",\r\n    \"resolve-url-loader\": \"~2.2.1\",\r\n    \"tar.gz\": \"^1.0.7\",\r\n    \"tns-platform-declarations\": \"4.2.1\",\r\n    \"nativescript-dev-typescript\": \"~0.7.0\",\r\n    \"tslint\": \"^5.4.2\",\r\n    \"typescript\": \"~2.7.2\",\r\n    \"@types/chai\": \"~4.1.3\",\r\n    \"@types/mocha\": \"~5.2.1\",\r\n    \"@types/node\": \"^7.0.5\"\r\n  },\r\n  \"scripts\": {\r\n    \"lint\": \"eslint \\\"app/**/*.js\\\"\",\r\n    \"tslint\": \"tslint -p tsconfig.json\",\r\n    \"tsc\": \"tsc\",\r\n    \"build\": \"node scripts/build.js\",\r\n    \"archive\": \"node scripts/archive.js\",\r\n    \"inject\": \"mdinject --root=app --docsroot=dist/cookbook --sourceext=\\\".js|.ts|.css|.xml\\\" --snippettitles=\\\"JavaScript|TypeScript|CSS|XML\\\"\",\r\n    \"pretsc\": \"npm install\",\r\n    \"pretslint\": \"npm run tsc\",\r\n    \"prelint\": \"npm run tslint\",\r\n    \"prebuild\": \"npm run lint\",\r\n    \"postbuild\": \"npm run inject && npm run archive\",\r\n    \"e2e\": \"mocha --opts ./e2e/config/mocha.opts\"\r\n  }\r\n}\r\n```\r\n- [x] Webpack configuration:\r\n```\r\nconst { join, relative, resolve, sep } = require(\"path\");\r\n\r\nconst webpack = require(\"webpack\");\r\nconst nsWebpack = require(\"nativescript-dev-webpack\");\r\nconst nativescriptTarget = require(\"nativescript-dev-webpack/nativescript-target\");\r\nconst CleanWebpackPlugin = require(\"clean-webpack-plugin\");\r\nconst CopyWebpackPlugin = require(\"copy-webpack-plugin\");\r\nconst { BundleAnalyzerPlugin } = require(\"webpack-bundle-analyzer\");\r\nconst { NativeScriptWorkerPlugin } = require(\"nativescript-worker-loader/NativeScriptWorkerPlugin\");\r\nconst UglifyJsPlugin = require(\"uglifyjs-webpack-plugin\");\r\n\r\nmodule.exports = env => {\r\n    // Add your custom Activities, Services and other Android app components here.\r\n    const appComponents = [\r\n        \"tns-core-modules/ui/frame\",\r\n        \"tns-core-modules/ui/frame/activity\",\r\n    ];\r\n\r\n    const platform = env && (env.android && \"android\" || env.ios && \"ios\");\r\n    if (!platform) {\r\n        throw new Error(\"You need to provide a target platform!\");\r\n    }\r\n\r\n    const platforms = [\"ios\", \"android\"];\r\n    const projectRoot = __dirname;\r\n\r\n    // Default destination inside platforms/<platform>/...\r\n    const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));\r\n    const appResourcesPlatformDir = platform === \"android\" ? \"Android\" : \"iOS\";\r\n\r\n    const {\r\n        // The 'appPath' and 'appResourcesPath' values are fetched from\r\n        // the nsconfig.json configuration file\r\n        // when bundling with `tns run android|ios --bundle`.\r\n        appPath = \"app\",\r\n        appResourcesPath = \"app/App_Resources\",\r\n\r\n        // You can provide the following flags when running 'tns run android|ios'\r\n        snapshot, // --env.snapshot\r\n        uglify, // --env.uglify\r\n        report, // --env.report\r\n        sourceMap, // --env.sourceMap\r\n    } = env;\r\n\r\n    const appFullPath = resolve(projectRoot, appPath);\r\n    const appResourcesFullPath = resolve(projectRoot, appResourcesPath);\r\n\r\n    const entryModule = nsWebpack.getEntryModule(appFullPath);\r\n    const entryPath = `.${sep}${entryModule}.ts`;\r\n\r\n    const config = {\r\n        mode: uglify ? \"production\" : \"development\",\r\n        context: appFullPath,\r\n        watchOptions: {\r\n            ignored: [\r\n                appResourcesFullPath,\r\n                // Don't watch hidden files\r\n                \"**/.*\",\r\n            ]\r\n        },\r\n        target: nativescriptTarget,\r\n        entry: {\r\n            bundle: entryPath,\r\n        },\r\n        output: {\r\n            pathinfo: false,\r\n            path: dist,\r\n            libraryTarget: \"commonjs2\",\r\n            filename: \"[name].js\",\r\n            globalObject: \"global\",\r\n        },\r\n        resolve: {\r\n            extensions: [\".ts\", \".js\", \".scss\", \".css\"],\r\n            // Resolve {N} system modules from tns-core-modules\r\n            modules: [\r\n                resolve(__dirname, \"node_modules/tns-core-modules\"),\r\n                resolve(__dirname, \"node_modules\"),\r\n                \"node_modules/tns-core-modules\",\r\n                \"node_modules\",\r\n            ],\r\n            alias: {\r\n                '~': appFullPath\r\n            },\r\n            // don't resolve symlinks to symlinked modules\r\n            symlinks: false\r\n        },\r\n        resolveLoader: {\r\n            // don't resolve symlinks to symlinked loaders\r\n            symlinks: false\r\n        },\r\n        node: {\r\n            // Disable node shims that conflict with NativeScript\r\n            \"http\": false,\r\n            \"timers\": false,\r\n            \"setImmediate\": false,\r\n            \"fs\": \"empty\",\r\n            \"__dirname\": false,\r\n        },\r\n        devtool: sourceMap ? \"inline-source-map\" : \"none\",\r\n        optimization:  {\r\n            splitChunks: {\r\n                cacheGroups: {\r\n                    vendor: {\r\n                        name: \"vendor\",\r\n                        chunks: \"all\",\r\n                        test: (module, chunks) => {\r\n                            const moduleName = module.nameForCondition ? module.nameForCondition() : '';\r\n                            return /[\\\\/]node_modules[\\\\/]/.test(moduleName) ||\r\n                                    appComponents.some(comp => comp === moduleName);\r\n\r\n                        },\r\n                        enforce: true,\r\n                    },\r\n                }\r\n            },\r\n            minimize: !!uglify,\r\n            minimizer: [\r\n                new UglifyJsPlugin({\r\n                    uglifyOptions: {\r\n                        parallel: true,\r\n                        cache: true,\r\n                        output: {\r\n                            comments: false,\r\n                        },\r\n                        compress: {\r\n                            // The Android SBG has problems parsing the output\r\n                            // when these options are enabled\r\n                            'collapse_vars': platform !== \"android\",\r\n                            sequences: platform !== \"android\",\r\n                        }\r\n                    }\r\n                })\r\n            ],\r\n        },\r\n        module: {\r\n            rules: [\r\n                {\r\n                    test: new RegExp(entryPath),\r\n                    use: [\r\n                        // Require all Android app components\r\n                        platform === \"android\" && {\r\n                            loader: \"nativescript-dev-webpack/android-app-components-loader\",\r\n                            options: { modules: appComponents }\r\n                        },\r\n\r\n                        {\r\n                            loader: \"nativescript-dev-webpack/bundle-config-loader\",\r\n                            options: {\r\n                                loadCss: !snapshot, // load the application css if in debug mode\r\n                            }\r\n                        },\r\n                    ].filter(loader => !!loader)\r\n                },\r\n\r\n                { test: /\\.(html|xml)$/, use: \"nativescript-dev-webpack/xml-namespace-loader\"},\r\n\r\n                {\r\n                    test: /\\.css$/,\r\n                    use: { loader: \"css-loader\", options: { minimize: false, url: false } }\r\n                },\r\n\r\n                {\r\n                    test: /\\.scss$/,\r\n                    use: [\r\n                        { loader: \"css-loader\", options: { minimize: false, url: false } },\r\n                        \"sass-loader\"\r\n                    ]\r\n                },\r\n\r\n                {\r\n                    test: /\\.ts$/,\r\n                    use: {\r\n                        loader: \"awesome-typescript-loader\",\r\n                        options: { configFileName: \"tsconfig.esm.json\" },\r\n                    }\r\n                },\r\n            ]\r\n        },\r\n        plugins: [\r\n            // Define useful constants like TNS_WEBPACK\r\n            new webpack.DefinePlugin({\r\n                \"global.TNS_WEBPACK\": \"true\",\r\n                \"process\": undefined,\r\n            }),\r\n            // Remove all files from the out dir.\r\n            new CleanWebpackPlugin([ `${dist}/**/*` ]),\r\n            // Copy native app resources to out dir.\r\n            new CopyWebpackPlugin([\r\n              {\r\n                from: `${appResourcesFullPath}/${appResourcesPlatformDir}`,\r\n                to: `${dist}/App_Resources/${appResourcesPlatformDir}`,\r\n                context: projectRoot\r\n              },\r\n            ]),\r\n            // Copy assets to out dir. Add your own globs as needed.\r\n            new CopyWebpackPlugin([\r\n                { from: \"fonts/**\" },\r\n                { from: \"**/*.jpg\" },\r\n                { from: \"**/*.png\" },\r\n            ], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),\r\n            // Generate a bundle starter script and activate it in package.json\r\n            new nsWebpack.GenerateBundleStarterPlugin([\r\n                \"./vendor\",\r\n                \"./bundle\",\r\n            ]),\r\n            // For instructions on how to set up workers with webpack\r\n            // check out https://github.com/nativescript/worker-loader\r\n            new NativeScriptWorkerPlugin(),\r\n            new nsWebpack.PlatformFSPlugin({\r\n                platform,\r\n                platforms,\r\n            }),\r\n            // Does IPC communication with the {N} CLI to notify events when running in watch mode.\r\n            new nsWebpack.WatchStateLoggerPlugin(),\r\n        ],\r\n    };\r\n\r\n    if (report) {\r\n        // Generate report files for bundles content\r\n        config.plugins.push(new BundleAnalyzerPlugin({\r\n            analyzerMode: \"static\",\r\n            openAnalyzer: false,\r\n            generateStatsFile: true,\r\n            reportFilename: resolve(projectRoot, \"report\", `report.html`),\r\n            statsFilename: resolve(projectRoot, \"report\", `stats.json`),\r\n        }));\r\n    }\r\n\r\n    if (snapshot) {\r\n        config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({\r\n            chunk: \"vendor\",\r\n            requireModules: [\r\n                \"tns-core-modules/bundle-entry-points\",\r\n            ],\r\n            projectRoot,\r\n            webpackConfig: config,\r\n        }));\r\n    }\r\n\r\n    return config;\r\n};\r\n\r\n```\r\n\r\n\r\n[demo apps](https://github.com/NativeScript/nativescript-sdk-examples-js/tree/master/app/ns-ui-widgets-category/placeholder/platform-files)\r\n"},"comment":{"url":"https://api.github.com/repos/NativeScript/nativescript-dev-webpack/issues/comments/426231978","html_url":"https://github.com/NativeScript/nativescript-dev-webpack/issues/672#issuecomment-426231978","issue_url":"https://api.github.com/repos/NativeScript/nativescript-dev-webpack/issues/672","id":426231978,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjIzMTk3OA==","user":{"login":"NickIliev","id":18008302,"node_id":"MDQ6VXNlcjE4MDA4MzAy","avatar_url":"https://avatars2.githubusercontent.com/u/18008302?v=4","gravatar_id":"","url":"https://api.github.com/users/NickIliev","html_url":"https://github.com/NickIliev","followers_url":"https://api.github.com/users/NickIliev/followers","following_url":"https://api.github.com/users/NickIliev/following{/other_user}","gists_url":"https://api.github.com/users/NickIliev/gists{/gist_id}","starred_url":"https://api.github.com/users/NickIliev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickIliev/subscriptions","organizations_url":"https://api.github.com/users/NickIliev/orgs","repos_url":"https://api.github.com/users/NickIliev/repos","events_url":"https://api.github.com/users/NickIliev/events{/privacy}","received_events_url":"https://api.github.com/users/NickIliev/received_events","type":"User","site_admin":false},"created_at":"2018-10-02T10:57:08Z","updated_at":"2018-10-02T10:57:08Z","author_association":"MEMBER","body":"Also reproducible in QSF logged in [https://github.com/NativeScript/nativescript-marketplace-demo/issues/301#issuecomment-426221538](https://github.com/NativeScript/nativescript-marketplace-demo/issues/301#issuecomment-426221538)"}}
{"actor":{"display_login":"NickIliev"}}