File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,15 @@ const TerserPlugin = require('terser-webpack-plugin');
1212const VueLoaderPlugin = require ( 'vue-loader/lib/plugin' ) ;
1313const NsVueTemplateCompiler = require ( 'nativescript-vue-template-compiler' ) ;
1414
15- const nsWebpack = require ( '@nativescript/webpack' ) ;
16- const nativescriptTarget = require ( '@nativescript/webpack/nativescript-target' ) ;
1715const { NativeScriptWorkerPlugin } = require ( 'nativescript-worker-loader/NativeScriptWorkerPlugin' ) ;
1816
1917const hashSalt = Date . now ( ) . toString ( ) ;
2018
2119const DefinePlugin = require ( 'webpack/lib/DefinePlugin' ) ;
2220
21+ let nsWebpack
22+ let nativescriptTarget
23+
2324// // // TO BE REMOVED SOON
2425// // // // eslint-disable-next-line prefer-destructuring
2526// // // const PlatformFSPlugin = nsWebpack.PlatformFSPlugin;
@@ -146,6 +147,11 @@ module.exports = (api, projectOptions) => {
146147 // throw new Error('You need to provide a target platform!');
147148 }
148149
150+ if ( platform !== 'web' ) {
151+ nsWebpack = require ( '@nativescript/webpack' ) ;
152+ nativescriptTarget = require ( '@nativescript/webpack/nativescript-target' ) ;
153+ }
154+
149155 const projectRoot = api . service . context ;
150156 const appMode = platform === 'android' ? 'native' : platform === 'ios' ? 'native' : 'web' ;
151157
You can’t perform that action at this time.
0 commit comments