Skip to content
This repository was archived by the owner on Aug 7, 2021. It is now read-only.

feat: add support for web workers to default template #269

Merged
merged 2 commits into from
Sep 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dependencyManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function getRequiredDeps(packageJson) {
"copy-webpack-plugin": "~4.0.1",
"raw-loader": "~0.5.1",
"nativescript-css-loader": "~0.26.0",
"nativescript-worker-loader": "~0.8.1",
"resolve-url-loader": "~2.1.0",
"extract-text-webpack-plugin": "~3.0.0",
};
Expand Down
1 change: 1 addition & 0 deletions prepublish/common/imports.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target
const CopyWebpackPlugin = require("copy-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
`;
3 changes: 3 additions & 0 deletions prepublish/common/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ module.exports = `
"./vendor",
"./bundle",
]),

// Support for web workers since v3.2
new NativeScriptWorkerPlugin(),

// Generate report files for bundles content
new BundleAnalyzerPlugin({
Expand Down
4 changes: 4 additions & 0 deletions templates/webpack.angular.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target
const CopyWebpackPlugin = require("copy-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");

const { AotPlugin } = require("@ngtools/webpack");

Expand Down Expand Up @@ -175,6 +176,9 @@ function getPlugins(platform, env) {
"./vendor",
"./bundle",
]),

// Support for web workers since v3.2
new NativeScriptWorkerPlugin(),

// Generate report files for bundles content
new BundleAnalyzerPlugin({
Expand Down
4 changes: 4 additions & 0 deletions templates/webpack.javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target
const CopyWebpackPlugin = require("copy-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");


const mainSheet = `app.css`;
Expand Down Expand Up @@ -159,6 +160,9 @@ function getPlugins(platform, env) {
"./vendor",
"./bundle",
]),

// Support for web workers since v3.2
new NativeScriptWorkerPlugin(),

// Generate report files for bundles content
new BundleAnalyzerPlugin({
Expand Down
4 changes: 4 additions & 0 deletions templates/webpack.typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target
const CopyWebpackPlugin = require("copy-webpack-plugin");
const ExtractTextPlugin = require("extract-text-webpack-plugin");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");


const mainSheet = `app.css`;
Expand Down Expand Up @@ -168,6 +169,9 @@ function getPlugins(platform, env) {
"./vendor",
"./bundle",
]),

// Support for web workers since v3.2
new NativeScriptWorkerPlugin(),

// Generate report files for bundles content
new BundleAnalyzerPlugin({
Expand Down