Skip to content
This repository was archived by the owner on Feb 15, 2024. It is now read-only.

Commit 64b73dc

Browse files
committed
Update npm dependencies, use core-js/regenerator-runtime directly instead of through babel-polyfill
1 parent 2f44465 commit 64b73dc

File tree

3 files changed

+22
-17
lines changed

3 files changed

+22
-17
lines changed

generators/app/index.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ module.exports = class extends Generator {
575575
if (this.props.useLoader) {
576576
pkg.dependencies = pkg.dependencies || (pkg.dependencies = {});
577577
if (this.props.loadingType === promptOptions.loadingType.AMD) {
578-
pkg.dependencies["requirejs"] = "^2.3.5";
578+
pkg.dependencies["requirejs"] = "^2.3.6";
579579
}
580580
}
581581

@@ -592,7 +592,7 @@ module.exports = class extends Generator {
592592
watch: "tsc -w"
593593
},
594594
devDependencies: {
595-
typescript: "^2.7.2"
595+
typescript: "^3.7.3"
596596
}
597597
});
598598

@@ -606,21 +606,22 @@ module.exports = class extends Generator {
606606
productionParam: "--mode production",
607607
devParam: "--mode development",
608608
deps: {
609-
"@yworks/optimizer": "^0.1.12",
610-
webpack: "^4.22.0",
611-
"webpack-cli": "^3.1.2",
612-
"webpack-dev-server": "^3.1.10",
613-
"css-loader": "^2.1.1",
614-
"mini-css-extract-plugin": "^0.5.0",
615-
"babel-loader": "^8.0.5",
616-
"@babel/core": "^7.4.0",
617-
"@babel/preset-env": "^7.4.2",
618-
"@babel/polyfill": "^7.4.0"
609+
"@yworks/optimizer": "^1.0.5",
610+
webpack: "^4.41.2",
611+
"webpack-cli": "^3.3.10",
612+
"webpack-dev-server": "^3.9.0",
613+
"css-loader": "^3.3.0",
614+
"mini-css-extract-plugin": "^0.8.0",
615+
"babel-loader": "^8.0.6",
616+
"@babel/core": "^7.7.5",
617+
"@babel/preset-env": "^7.7.6",
618+
"core-js": "^3.4.8",
619+
"regenerator-runtime": "^0.13.3"
619620
},
620621
tsDeps: {
621-
"@babel/preset-typescript": "^7.3.2",
622-
"ts-loader": "^4.0.1",
623-
typescript: "^2.7.2"
622+
"@babel/preset-typescript": "^7.7.4",
623+
"ts-loader": "^6.2.1",
624+
typescript: "^3.7.3"
624625
}
625626
};
626627
}

generators/app/templates/webpack4.config.ejs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const YFilesOptimizerPlugin = require('@yworks/optimizer/webpack-plugin');
77
const config = {
88

99
entry: {
10-
app: ['@babel/polyfill', path.resolve('<%= scriptsPath + appScript %>')]
10+
app: ['regenerator-runtime/runtime', path.resolve('<%= scriptsPath + appScript %>')]
1111
},
1212

1313
output: {
@@ -97,6 +97,10 @@ module.exports = function (env, options) {
9797
}
9898

9999
if(options.mode === 'production') {
100+
// Add the core-js polyfill for production
101+
config.entry.app.unshift('core-js/stable')
102+
103+
// Run the yWorks Optimizer
100104
config.plugins.unshift(
101105
new YFilesOptimizerPlugin({
102106
logLevel: 'info'

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "generator-yfiles-app",
3-
"version": "3.0.3",
3+
"version": "3.0.4",
44
"description": "A generator that scaffolds a yFiles for HTML powered application. Requires local yFiles package.",
55
"homepage": "https://www.yworks.com",
66
"author": {

0 commit comments

Comments
 (0)