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

Commit d8a17a6

Browse files
authored
fix: remove mangle excludes (#461)
BREAKING CHANGES: `uglifyMangleExcludes` is no longer exported from the nativescript-dev-webpack plugin and shouldn't be used in the webpack configuration. Before: ``` // webpack.config.js // ... uglifyOptions: { mangle: { reserved: nsWebpack.uglifyMangleExcludes }, // ... } ``` After: ``` // webpack.config.js // ... uglifyOptions: { // ... } ```
1 parent 659d1e7 commit d8a17a6

File tree

6 files changed

+9
-149
lines changed

6 files changed

+9
-149
lines changed

Diff for: demo/TypeScriptApp/package.json

+9-3
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@
1818
},
1919
"devDependencies": {
2020
"awesome-typescript-loader": "~3.1.3",
21+
"@types/chai": "^4.0.2",
22+
"@types/mocha": "^2.2.41",
23+
"@types/node": "^7.0.5",
2124
"babel-traverse": "6.26.0",
2225
"babel-types": "6.26.0",
2326
"babylon": "6.18.0",
2427
"copy-webpack-plugin": "~4.0.1",
2528
"css-loader": "~0.28.7",
2629
"extract-text-webpack-plugin": "~3.0.0",
2730
"lazy": "1.0.11",
31+
"mocha": "~3.5.0",
32+
"mocha-junit-reporter": "^1.13.0",
33+
"mocha-multi": "^0.11.0",
2834
"nativescript-dev-appium": "next",
2935
"nativescript-dev-sass": "^1.3.5",
3036
"nativescript-dev-typescript": "next",
@@ -35,9 +41,9 @@
3541
"resolve-url-loader": "~2.1.0",
3642
"sass-loader": "^6.0.6",
3743
"typescript": "~2.6.2",
38-
"webpack": "~3.8.1",
39-
"webpack-bundle-analyzer": "^2.8.2",
40-
"webpack-sources": "~1.0.1"
44+
"webpack": "~3.10.0",
45+
"webpack-bundle-analyzer": "^2.9.1",
46+
"webpack-sources": "^1.1.0"
4147
},
4248
"scripts": {
4349
"ns-bundle": "ns-bundle",

Diff for: index.js

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ if (isAngular({ projectDir: PROJECT_DIR })) {
1212
Object.assign(exports, require('./plugins/angular'));
1313
}
1414

15-
exports.uglifyMangleExcludes = require("./mangle-excludes");
16-
1715
exports.getEntryModule = function () {
1816
const maybePackageJsonEntry = getPackageJsonEntry();
1917
if (!maybePackageJsonEntry) {

Diff for: mangle-excludes.js

-141
This file was deleted.

Diff for: templates/webpack.angular.js

-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ module.exports = env => {
161161
const compress = platform !== "android";
162162
config.plugins.push(new UglifyJsPlugin({
163163
uglifyOptions: {
164-
mangle: { reserved: nsWebpack.uglifyMangleExcludes },
165164
compress,
166165
}
167166
}));

Diff for: templates/webpack.javascript.js

-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ module.exports = env => {
139139
const compress = platform !== "android";
140140
config.plugins.push(new UglifyJsPlugin({
141141
uglifyOptions: {
142-
mangle: { reserved: nsWebpack.uglifyMangleExcludes },
143142
compress,
144143
}
145144
}));

Diff for: templates/webpack.typescript.js

-1
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ module.exports = env => {
141141
const compress = platform !== "android";
142142
config.plugins.push(new UglifyJsPlugin({
143143
uglifyOptions: {
144-
mangle: { reserved: nsWebpack.uglifyMangleExcludes },
145144
compress,
146145
}
147146
}));

0 commit comments

Comments
 (0)