diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/angular.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/angular.spec.ts.snap index 352881686..aaf09f1a9 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/angular.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/angular.spec.ts.snap @@ -19,15 +19,15 @@ exports[`angular configuration for android 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/, - /Zone\\\\.js does not support native async\\\\/await/, - /environment(\\\\.(\\\\w+))?\\\\.ts is part of the TypeScript compilation but it's unused/, + /System.import\\(\\) is deprecated/, + /Zone\\.js does not support native async\\/await/, + /environment(\\.(\\w+))?\\.ts is part of the TypeScript compilation but it's unused/, { - module: /@angular\\\\/core\\\\/(__ivy_ngcc__\\\\/)?fesm2015\\\\/core.js/, + module: /@angular\\/core\\/(__ivy_ngcc__\\/)?fesm2015\\/core.js/, message: /Critical dependency: the request of a dependency is an expression/ }, - /core\\\\/profiling/, - /core\\\\/ui\\\\/styling/ + /core\\/profiling/, + /core\\/ui\\/styling/ ], output: { path: '__jest__/platforms/android/app/src/main/assets/app', @@ -91,7 +91,7 @@ exports[`angular configuration for android 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -101,14 +101,14 @@ exports[`angular configuration for android 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -118,7 +118,7 @@ exports[`angular configuration for android 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, include: [ '__jest__/src/app.css', '__jest__/src/app.android.css', @@ -153,7 +153,7 @@ exports[`angular configuration for android 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, include: [ '__jest__/src/app.scss', '__jest__/src/app.android.scss', @@ -192,9 +192,9 @@ exports[`angular configuration for android 1`] = ` }, /* config.module.rule('angular-webpack-loader') */ { - test: /\\\\.[cm]?[tj]sx?$/, + test: /\\.[cm]?[tj]sx?$/, exclude: [ - /[/\\\\\\\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill)[/\\\\\\\\]/ + /[/\\\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill)[/\\\\]/ ], use: [ /* config.module.rule('angular-webpack-loader').use('webpack-loader') */ @@ -212,7 +212,7 @@ exports[`angular configuration for android 1`] = ` }, /* config.module.rule('angular') */ { - test: /(?:\\\\.ngfactory.js|\\\\.ngstyle\\\\.js|\\\\.ts)$/, + test: /(?:\\.ngfactory.js|\\.ngstyle\\.js|\\.ts)$/, use: [ /* config.module.rule('angular').use('@ngtools/webpack') */ { @@ -222,14 +222,14 @@ exports[`angular configuration for android 1`] = ` }, /* config.module.rule('@angular/core') */ { - test: /[\\\\/\\\\\\\\]@angular[\\\\/\\\\\\\\]core[\\\\/\\\\\\\\].+\\\\.js$/, + test: /[\\/\\\\]@angular[\\/\\\\]core[\\/\\\\].+\\.js$/, parser: { system: true } }, /* config.module.rule('html') */ { - test: /\\\\.html$/, + test: /\\.html$/, use: [ /* config.module.rule('html').use('raw-loader') */ { @@ -239,7 +239,7 @@ exports[`angular configuration for android 1`] = ` }, /* config.module.rule('css|component') */ { - test: /\\\\.css$/, + test: /\\.css$/, exclude: [ '__jest__/src/app.css', '__jest__/src/app.android.css', @@ -254,7 +254,7 @@ exports[`angular configuration for android 1`] = ` }, /* config.module.rule('scss|component') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, exclude: [ '__jest__/src/app.scss', '__jest__/src/app.android.scss', @@ -294,7 +294,7 @@ exports[`angular configuration for android 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -335,7 +335,7 @@ exports[`angular configuration for android 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(ios)\\\\.(\\\\w+)$/ + /\\.(ios)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -343,8 +343,8 @@ exports[`angular configuration for android 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, @@ -443,15 +443,15 @@ exports[`angular configuration for ios 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/, - /Zone\\\\.js does not support native async\\\\/await/, - /environment(\\\\.(\\\\w+))?\\\\.ts is part of the TypeScript compilation but it's unused/, + /System.import\\(\\) is deprecated/, + /Zone\\.js does not support native async\\/await/, + /environment(\\.(\\w+))?\\.ts is part of the TypeScript compilation but it's unused/, { - module: /@angular\\\\/core\\\\/(__ivy_ngcc__\\\\/)?fesm2015\\\\/core.js/, + module: /@angular\\/core\\/(__ivy_ngcc__\\/)?fesm2015\\/core.js/, message: /Critical dependency: the request of a dependency is an expression/ }, - /core\\\\/profiling/, - /core\\\\/ui\\\\/styling/ + /core\\/profiling/, + /core\\/ui\\/styling/ ], output: { path: '__jest__/platforms/ios/jest/app', @@ -515,7 +515,7 @@ exports[`angular configuration for ios 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -525,14 +525,14 @@ exports[`angular configuration for ios 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -542,7 +542,7 @@ exports[`angular configuration for ios 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, include: [ '__jest__/src/app.css', '__jest__/src/app.ios.css', @@ -577,7 +577,7 @@ exports[`angular configuration for ios 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, include: [ '__jest__/src/app.scss', '__jest__/src/app.ios.scss', @@ -616,9 +616,9 @@ exports[`angular configuration for ios 1`] = ` }, /* config.module.rule('angular-webpack-loader') */ { - test: /\\\\.[cm]?[tj]sx?$/, + test: /\\.[cm]?[tj]sx?$/, exclude: [ - /[/\\\\\\\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill)[/\\\\\\\\]/ + /[/\\\\](?:core-js|@babel|tslib|web-animations-js|web-streams-polyfill)[/\\\\]/ ], use: [ /* config.module.rule('angular-webpack-loader').use('webpack-loader') */ @@ -636,7 +636,7 @@ exports[`angular configuration for ios 1`] = ` }, /* config.module.rule('angular') */ { - test: /(?:\\\\.ngfactory.js|\\\\.ngstyle\\\\.js|\\\\.ts)$/, + test: /(?:\\.ngfactory.js|\\.ngstyle\\.js|\\.ts)$/, use: [ /* config.module.rule('angular').use('@ngtools/webpack') */ { @@ -646,14 +646,14 @@ exports[`angular configuration for ios 1`] = ` }, /* config.module.rule('@angular/core') */ { - test: /[\\\\/\\\\\\\\]@angular[\\\\/\\\\\\\\]core[\\\\/\\\\\\\\].+\\\\.js$/, + test: /[\\/\\\\]@angular[\\/\\\\]core[\\/\\\\].+\\.js$/, parser: { system: true } }, /* config.module.rule('html') */ { - test: /\\\\.html$/, + test: /\\.html$/, use: [ /* config.module.rule('html').use('raw-loader') */ { @@ -663,7 +663,7 @@ exports[`angular configuration for ios 1`] = ` }, /* config.module.rule('css|component') */ { - test: /\\\\.css$/, + test: /\\.css$/, exclude: [ '__jest__/src/app.css', '__jest__/src/app.ios.css', @@ -678,7 +678,7 @@ exports[`angular configuration for ios 1`] = ` }, /* config.module.rule('scss|component') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, exclude: [ '__jest__/src/app.scss', '__jest__/src/app.ios.scss', @@ -718,7 +718,7 @@ exports[`angular configuration for ios 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -759,7 +759,7 @@ exports[`angular configuration for ios 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(android)\\\\.(\\\\w+)$/ + /\\.(android)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -767,8 +767,8 @@ exports[`angular configuration for ios 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, @@ -850,7 +850,7 @@ exports[`angular configuration for ios 1`] = ` `; exports[`angular configuration loads polyfills.android.ts into the bundle entry if it exists 1`] = ` -Array [ +[ "__jest__/src/polyfills.android.ts", "@nativescript/core/bundle-entry-points", "__jest__/src/app.js", @@ -860,7 +860,7 @@ Array [ `; exports[`angular configuration loads polyfills.ios.ts into the bundle entry if it exists 1`] = ` -Array [ +[ "__jest__/src/polyfills.ios.ts", "@nativescript/core/bundle-entry-points", "__jest__/src/app.js", @@ -868,7 +868,7 @@ Array [ `; exports[`angular configuration loads polyfills.ts into the bundle entry if it exists 1`] = ` -Array [ +[ "__jest__/src/polyfills.ts", "@nativescript/core/bundle-entry-points", "__jest__/src/app.js", diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/base.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/base.spec.ts.snap index 751e44ec4..fdd16144a 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/base.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/base.spec.ts.snap @@ -19,7 +19,7 @@ exports[`base configuration for android 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/android/app/src/main/assets/app', @@ -79,7 +79,7 @@ exports[`base configuration for android 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -90,7 +90,7 @@ exports[`base configuration for android 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -110,14 +110,14 @@ exports[`base configuration for android 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -127,7 +127,7 @@ exports[`base configuration for android 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -157,7 +157,7 @@ exports[`base configuration for android 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -196,7 +196,7 @@ exports[`base configuration for android 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -246,7 +246,7 @@ exports[`base configuration for android 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(ios)\\\\.(\\\\w+)$/ + /\\.(ios)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -254,8 +254,8 @@ exports[`base configuration for android 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, @@ -340,7 +340,7 @@ exports[`base configuration for ios 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/ios/jest/app', @@ -400,7 +400,7 @@ exports[`base configuration for ios 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -411,7 +411,7 @@ exports[`base configuration for ios 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -431,14 +431,14 @@ exports[`base configuration for ios 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -448,7 +448,7 @@ exports[`base configuration for ios 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -478,7 +478,7 @@ exports[`base configuration for ios 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -517,7 +517,7 @@ exports[`base configuration for ios 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -567,7 +567,7 @@ exports[`base configuration for ios 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(android)\\\\.(\\\\w+)$/ + /\\.(android)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -575,8 +575,8 @@ exports[`base configuration for ios 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, @@ -644,7 +644,7 @@ exports[`base configuration for ios 1`] = ` `; exports[`base configuration support env.watchNodeModules 1`] = ` -Object { - "managedPaths": Array [], +{ + "managedPaths": [], } `; diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/javascript.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/javascript.spec.ts.snap index d52f8d5b1..25ff25ec5 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/javascript.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/javascript.spec.ts.snap @@ -19,7 +19,7 @@ exports[`javascript configuration for android 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/android/app/src/main/assets/app', @@ -79,7 +79,7 @@ exports[`javascript configuration for android 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -90,7 +90,7 @@ exports[`javascript configuration for android 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -110,14 +110,14 @@ exports[`javascript configuration for android 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -127,7 +127,7 @@ exports[`javascript configuration for android 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -157,7 +157,7 @@ exports[`javascript configuration for android 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -196,7 +196,7 @@ exports[`javascript configuration for android 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -246,7 +246,7 @@ exports[`javascript configuration for android 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(ios)\\\\.(\\\\w+)$/ + /\\.(ios)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -254,8 +254,8 @@ exports[`javascript configuration for android 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, @@ -304,7 +304,7 @@ exports[`javascript configuration for android 1`] = ` new WatchStatePlugin(), /* config.plugin('ContextExclusionPlugin|exclude_files') */ new ContextExclusionPlugin( - /\\\\b_.+\\\\./ + /\\b_.+\\./ ) ], entry: { @@ -339,7 +339,7 @@ exports[`javascript configuration for ios 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/ios/jest/app', @@ -399,7 +399,7 @@ exports[`javascript configuration for ios 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -410,7 +410,7 @@ exports[`javascript configuration for ios 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -430,14 +430,14 @@ exports[`javascript configuration for ios 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -447,7 +447,7 @@ exports[`javascript configuration for ios 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -477,7 +477,7 @@ exports[`javascript configuration for ios 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -516,7 +516,7 @@ exports[`javascript configuration for ios 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -566,7 +566,7 @@ exports[`javascript configuration for ios 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(android)\\\\.(\\\\w+)$/ + /\\.(android)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -574,8 +574,8 @@ exports[`javascript configuration for ios 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, @@ -624,7 +624,7 @@ exports[`javascript configuration for ios 1`] = ` new WatchStatePlugin(), /* config.plugin('ContextExclusionPlugin|exclude_files') */ new ContextExclusionPlugin( - /\\\\b_.+\\\\./ + /\\b_.+\\./ ) ], entry: { diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/react.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/react.spec.ts.snap index f78fa4ae0..84e482f85 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/react.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/react.spec.ts.snap @@ -19,7 +19,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/android/app/src/main/assets/app', @@ -89,7 +89,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -100,8 +100,8 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/, - /\\\\.tsx$/ + /\\.ts$/, + /\\.tsx$/ ], use: [ /* config.module.rule('ts').use('babel-loader|react-refresh') */ @@ -132,14 +132,14 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -149,7 +149,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -179,7 +179,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -218,7 +218,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -268,7 +268,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(ios)\\\\.(\\\\w+)$/ + /\\.(ios)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -276,8 +276,8 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, @@ -287,7 +287,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR process: 'global.process', __USE_TEST_ID__: false, __TEST__: false, - 'process.env.NODE_ENV': '\\"development\\"' + 'process.env.NODE_ENV': '"development"' } ), /* config.plugin('CopyWebpackPlugin') */ @@ -334,7 +334,7 @@ exports[`react configuration > android > adds ReactRefreshWebpackPlugin when HMR overlay: false, forceEnable: false, exclude: /node_modules/i, - include: /\\\\.([cm]js|[jt]sx?|flow)$/i + include: /\\.([cm]js|[jt]sx?|flow)$/i } ) ], @@ -369,7 +369,7 @@ exports[`react configuration > android > base config 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/android/app/src/main/assets/app', @@ -432,7 +432,7 @@ exports[`react configuration > android > base config 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -443,8 +443,8 @@ exports[`react configuration > android > base config 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/, - /\\\\.tsx$/ + /\\.ts$/, + /\\.tsx$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -464,14 +464,14 @@ exports[`react configuration > android > base config 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -481,7 +481,7 @@ exports[`react configuration > android > base config 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -511,7 +511,7 @@ exports[`react configuration > android > base config 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -550,7 +550,7 @@ exports[`react configuration > android > base config 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -600,7 +600,7 @@ exports[`react configuration > android > base config 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(ios)\\\\.(\\\\w+)$/ + /\\.(ios)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -608,8 +608,8 @@ exports[`react configuration > android > base config 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, @@ -619,7 +619,7 @@ exports[`react configuration > android > base config 1`] = ` process: 'global.process', __USE_TEST_ID__: false, __TEST__: false, - 'process.env.NODE_ENV': '\\"development\\"' + 'process.env.NODE_ENV': '"development"' } ), /* config.plugin('CopyWebpackPlugin') */ @@ -690,7 +690,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/ios/jest/app', @@ -760,7 +760,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -771,8 +771,8 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/, - /\\\\.tsx$/ + /\\.ts$/, + /\\.tsx$/ ], use: [ /* config.module.rule('ts').use('babel-loader|react-refresh') */ @@ -803,14 +803,14 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -820,7 +820,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -850,7 +850,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -889,7 +889,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -939,7 +939,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(android)\\\\.(\\\\w+)$/ + /\\.(android)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -947,8 +947,8 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, @@ -958,7 +958,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena process: 'global.process', __USE_TEST_ID__: false, __TEST__: false, - 'process.env.NODE_ENV': '\\"development\\"' + 'process.env.NODE_ENV': '"development"' } ), /* config.plugin('CopyWebpackPlugin') */ @@ -1005,7 +1005,7 @@ exports[`react configuration > ios > adds ReactRefreshWebpackPlugin when HMR ena overlay: false, forceEnable: false, exclude: /node_modules/i, - include: /\\\\.([cm]js|[jt]sx?|flow)$/i + include: /\\.([cm]js|[jt]sx?|flow)$/i } ) ], @@ -1041,7 +1041,7 @@ exports[`react configuration > ios > base config 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/ios/jest/app', @@ -1104,7 +1104,7 @@ exports[`react configuration > ios > base config 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -1115,8 +1115,8 @@ exports[`react configuration > ios > base config 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/, - /\\\\.tsx$/ + /\\.ts$/, + /\\.tsx$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -1136,14 +1136,14 @@ exports[`react configuration > ios > base config 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -1153,7 +1153,7 @@ exports[`react configuration > ios > base config 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -1183,7 +1183,7 @@ exports[`react configuration > ios > base config 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -1222,7 +1222,7 @@ exports[`react configuration > ios > base config 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -1272,7 +1272,7 @@ exports[`react configuration > ios > base config 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(android)\\\\.(\\\\w+)$/ + /\\.(android)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -1280,8 +1280,8 @@ exports[`react configuration > ios > base config 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, @@ -1291,7 +1291,7 @@ exports[`react configuration > ios > base config 1`] = ` process: 'global.process', __USE_TEST_ID__: false, __TEST__: false, - 'process.env.NODE_ENV': '\\"development\\"' + 'process.env.NODE_ENV': '"development"' } ), /* config.plugin('CopyWebpackPlugin') */ diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/svelte.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/svelte.spec.ts.snap index 49d960c77..1586380fb 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/svelte.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/svelte.spec.ts.snap @@ -19,7 +19,7 @@ exports[`svelte configuration for android 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/android/app/src/main/assets/app', @@ -83,7 +83,7 @@ exports[`svelte configuration for android 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(js|ts|svelte)$/, + test: /\\.(js|ts|svelte)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -94,7 +94,7 @@ exports[`svelte configuration for android 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -114,14 +114,14 @@ exports[`svelte configuration for android 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -131,7 +131,7 @@ exports[`svelte configuration for android 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -161,7 +161,7 @@ exports[`svelte configuration for android 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -195,7 +195,7 @@ exports[`svelte configuration for android 1`] = ` }, /* config.module.rule('svelte') */ { - test: /\\\\.svelte$/, + test: /\\.svelte$/, exclude: [ /node_modules/ ], @@ -223,7 +223,7 @@ exports[`svelte configuration for android 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -273,7 +273,7 @@ exports[`svelte configuration for android 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(ios)\\\\.(\\\\w+)$/ + /\\.(ios)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -281,8 +281,8 @@ exports[`svelte configuration for android 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, @@ -361,7 +361,7 @@ exports[`svelte configuration for ios 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/ios/jest/app', @@ -425,7 +425,7 @@ exports[`svelte configuration for ios 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(js|ts|svelte)$/, + test: /\\.(js|ts|svelte)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -436,7 +436,7 @@ exports[`svelte configuration for ios 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -456,14 +456,14 @@ exports[`svelte configuration for ios 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -473,7 +473,7 @@ exports[`svelte configuration for ios 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -503,7 +503,7 @@ exports[`svelte configuration for ios 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -537,7 +537,7 @@ exports[`svelte configuration for ios 1`] = ` }, /* config.module.rule('svelte') */ { - test: /\\\\.svelte$/, + test: /\\.svelte$/, exclude: [ /node_modules/ ], @@ -565,7 +565,7 @@ exports[`svelte configuration for ios 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -615,7 +615,7 @@ exports[`svelte configuration for ios 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(android)\\\\.(\\\\w+)$/ + /\\.(android)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -623,8 +623,8 @@ exports[`svelte configuration for ios 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/typescript.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/typescript.spec.ts.snap index 39af4794d..767cb350f 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/typescript.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/typescript.spec.ts.snap @@ -19,7 +19,7 @@ exports[`typescript configuration for android 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/android/app/src/main/assets/app', @@ -79,7 +79,7 @@ exports[`typescript configuration for android 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -90,7 +90,7 @@ exports[`typescript configuration for android 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -110,14 +110,14 @@ exports[`typescript configuration for android 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -127,7 +127,7 @@ exports[`typescript configuration for android 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -157,7 +157,7 @@ exports[`typescript configuration for android 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -196,7 +196,7 @@ exports[`typescript configuration for android 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -246,7 +246,7 @@ exports[`typescript configuration for android 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(ios)\\\\.(\\\\w+)$/ + /\\.(ios)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -254,8 +254,8 @@ exports[`typescript configuration for android 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, @@ -304,7 +304,7 @@ exports[`typescript configuration for android 1`] = ` new WatchStatePlugin(), /* config.plugin('ContextExclusionPlugin|exclude_files') */ new ContextExclusionPlugin( - /\\\\b_.+\\\\./ + /\\b_.+\\./ ) ], entry: { @@ -339,7 +339,7 @@ exports[`typescript configuration for ios 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/ios/jest/app', @@ -399,7 +399,7 @@ exports[`typescript configuration for ios 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -410,7 +410,7 @@ exports[`typescript configuration for ios 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -430,14 +430,14 @@ exports[`typescript configuration for ios 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -447,7 +447,7 @@ exports[`typescript configuration for ios 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -477,7 +477,7 @@ exports[`typescript configuration for ios 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -516,7 +516,7 @@ exports[`typescript configuration for ios 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -566,7 +566,7 @@ exports[`typescript configuration for ios 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(android)\\\\.(\\\\w+)$/ + /\\.(android)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -574,8 +574,8 @@ exports[`typescript configuration for ios 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, @@ -624,7 +624,7 @@ exports[`typescript configuration for ios 1`] = ` new WatchStatePlugin(), /* config.plugin('ContextExclusionPlugin|exclude_files') */ new ContextExclusionPlugin( - /\\\\b_.+\\\\./ + /\\b_.+\\./ ) ], entry: { diff --git a/packages/webpack5/__tests__/configuration/__snapshots__/vue.spec.ts.snap b/packages/webpack5/__tests__/configuration/__snapshots__/vue.spec.ts.snap index 9c21da6c7..3cb689ecc 100644 --- a/packages/webpack5/__tests__/configuration/__snapshots__/vue.spec.ts.snap +++ b/packages/webpack5/__tests__/configuration/__snapshots__/vue.spec.ts.snap @@ -19,7 +19,7 @@ exports[`vue configuration for android 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/android/app/src/main/assets/app', @@ -82,7 +82,7 @@ exports[`vue configuration for android 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -93,7 +93,7 @@ exports[`vue configuration for android 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -108,7 +108,7 @@ exports[`vue configuration for android 1`] = ` }, getCustomTransformers: function () { /* omitted long function */ }, appendTsSuffixTo: [ - '\\\\\\\\.vue$' + '\\\\.vue$' ] } } @@ -116,14 +116,14 @@ exports[`vue configuration for android 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -133,7 +133,7 @@ exports[`vue configuration for android 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -167,7 +167,7 @@ exports[`vue configuration for android 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -205,7 +205,7 @@ exports[`vue configuration for android 1`] = ` }, /* config.module.rule('vue') */ { - test: /\\\\.vue$/, + test: /\\.vue$/, use: [ /* config.module.rule('vue').use('vue-loader') */ { @@ -228,7 +228,7 @@ exports[`vue configuration for android 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -286,7 +286,7 @@ exports[`vue configuration for android 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(ios)\\\\.(\\\\w+)$/ + /\\.(ios)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -294,8 +294,8 @@ exports[`vue configuration for android 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: true, @@ -374,7 +374,7 @@ exports[`vue configuration for ios 1`] = ` ] }, ignoreWarnings: [ - /System.import\\\\(\\\\) is deprecated/ + /System.import\\(\\) is deprecated/ ], output: { path: '__jest__/platforms/ios/jest/app', @@ -437,7 +437,7 @@ exports[`vue configuration for ios 1`] = ` }, /* config.module.rule('workers') */ { - test: /\\\\.(mjs|js|ts)$/, + test: /\\.(mjs|js|ts)$/, use: [ /* config.module.rule('workers').use('nativescript-worker-loader') */ { @@ -448,7 +448,7 @@ exports[`vue configuration for ios 1`] = ` /* config.module.rule('ts') */ { test: [ - /\\\\.ts$/ + /\\.ts$/ ], use: [ /* config.module.rule('ts').use('ts-loader') */ @@ -463,7 +463,7 @@ exports[`vue configuration for ios 1`] = ` }, getCustomTransformers: function () { /* omitted long function */ }, appendTsSuffixTo: [ - '\\\\\\\\.vue$' + '\\\\.vue$' ] } } @@ -471,14 +471,14 @@ exports[`vue configuration for ios 1`] = ` }, /* config.module.rule('js') */ { - test: /\\\\.js$/, + test: /\\.js$/, exclude: [ /node_modules/ ] }, /* config.module.rule('xml') */ { - test: /\\\\.xml$/, + test: /\\.xml$/, use: [ /* config.module.rule('xml').use('xml-namespace-loader') */ { @@ -488,7 +488,7 @@ exports[`vue configuration for ios 1`] = ` }, /* config.module.rule('css') */ { - test: /\\\\.css$/, + test: /\\.css$/, use: [ /* config.module.rule('css').use('apply-css-loader') */ { @@ -522,7 +522,7 @@ exports[`vue configuration for ios 1`] = ` }, /* config.module.rule('scss') */ { - test: /\\\\.scss$/, + test: /\\.scss$/, use: [ /* config.module.rule('scss').use('apply-css-loader') */ { @@ -560,7 +560,7 @@ exports[`vue configuration for ios 1`] = ` }, /* config.module.rule('vue') */ { - test: /\\\\.vue$/, + test: /\\.vue$/, use: [ /* config.module.rule('vue').use('vue-loader') */ { @@ -583,7 +583,7 @@ exports[`vue configuration for ios 1`] = ` splitChunks: { cacheGroups: { defaultVendor: { - test: /[\\\\\\\\/]node_modules[\\\\\\\\/]/, + test: /[\\\\/]node_modules[\\\\/]/, priority: -10, name: 'vendor', chunks: 'all' @@ -641,7 +641,7 @@ exports[`vue configuration for ios 1`] = ` ), /* config.plugin('ContextExclusionPlugin|Other_Platforms') */ new ContextExclusionPlugin( - /\\\\.(android)\\\\.(\\\\w+)$/ + /\\.(android)\\.(\\w+)$/ ), /* config.plugin('DefinePlugin') */ new DefinePlugin( @@ -649,8 +649,8 @@ exports[`vue configuration for ios 1`] = ` __DEV__: true, __NS_WEBPACK__: true, __NS_ENV_VERBOSE__: false, - __NS_DEV_HOST_IPS__: '[\\"127.0.0.1\\",\\"192.168.0.10\\"]', - __CSS_PARSER__: '\\"css-tree\\"', + __NS_DEV_HOST_IPS__: '["127.0.0.1","192.168.0.10"]', + __CSS_PARSER__: '"css-tree"', __UI_USE_XML_PARSER__: true, __UI_USE_EXTERNAL_RENDERER__: false, __ANDROID__: false, diff --git a/packages/webpack5/package.json b/packages/webpack5/package.json index a0cdb8bcd..30d102828 100644 --- a/packages/webpack5/package.json +++ b/packages/webpack5/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/webpack", - "version": "5.0.8", + "version": "5.0.9-alpha.0", "private": false, "main": "dist/index.js", "files": [ @@ -21,8 +21,8 @@ "@pmmmwh/react-refresh-webpack-plugin": "~0.5.7", "acorn": "^8.0.0", "acorn-stage3": "^4.0.0", + "ansi-colors": "^4.1.3", "babel-loader": "^8.0.0", - "chalk": "^4.0.0", "cli-highlight": "^2.0.0", "commander": "^8.0.0", "copy-webpack-plugin": "^9.0.0", @@ -54,20 +54,20 @@ "webpack-virtual-modules": "^0.4.0" }, "devDependencies": { - "@angular-devkit/build-angular": "^13.1.2", + "@angular-devkit/build-angular": "^14.2.4", "@types/css": "0.0.33", - "@types/jest": "27.5.1", + "@types/jest": "29.1.1", "@types/loader-utils": "2.0.3", "@types/lodash.get": "4.4.7", "@types/micromatch": "4.0.2", "@types/sax": "1.2.4", "@types/terser-webpack-plugin": "5.2.0", "@types/webpack-virtual-modules": "0.1.1", - "jest": "28.1.0", - "jest-matcher-utils": "28.1.0", - "nativescript-vue-template-compiler": "2.9.2", - "ts-jest": "28.0.3", - "typescript": "4.7.3" + "jest": "29.1.2", + "jest-matcher-utils": "29.1.2", + "nativescript-vue-template-compiler": "2.9.3", + "ts-jest": "29.0.3", + "typescript": "4.7.4" }, "peerDependencies": { "nativescript-vue-template-compiler": "^2.8.1" diff --git a/packages/webpack5/src/bin/index.ts b/packages/webpack5/src/bin/index.ts index c9dddb315..1793c87eb 100644 --- a/packages/webpack5/src/bin/index.ts +++ b/packages/webpack5/src/bin/index.ts @@ -1,6 +1,6 @@ #!/usr/bin/env node -import { redBright, green, greenBright, yellow } from 'chalk'; +import { redBright, green, greenBright, yellow } from 'ansi-colors'; import { program } from 'commander'; import dedent from 'ts-dedent'; import webpack from 'webpack'; diff --git a/tools/scripts/pack-webpack5.mjs b/tools/scripts/pack-webpack5.mjs index bceb93c17..5b1f027ae 100755 --- a/tools/scripts/pack-webpack5.mjs +++ b/tools/scripts/pack-webpack5.mjs @@ -22,4 +22,4 @@ await fs.move(from, to, { }); console.log(chalk.green(`@nativescript/webpack has been built and packed.\n`)); -console.log(to); \ No newline at end of file +console.log(to);