Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ng13upgrade full aot #434

Draft
wants to merge 11 commits into
base: develop
Choose a base branch
from
Draft
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ speed-measure-plugin*.json
.settings/
*.sublime-workspace

.angular/*

# IDE - VSCode
.vscode/*
!.vscode/settings.json
Expand Down
9 changes: 7 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": false
},
"version": 1,
"projects": {
"extensions-cli": {
Expand All @@ -16,7 +19,8 @@
"index": "",
"main": "src/__extensions_index.ts",
"tsConfig": "tsconfig.app.json",
"aot": false,
"aot": true,
"buildOptimizer": true,
"extractLicenses": false,
"customWebpackConfig": {
"path": "./build/webpack-custom.ts",
Expand Down Expand Up @@ -44,7 +48,8 @@
}
]
}
}
},
"defaultConfiguration": "dev"
},
"serve": {
"builder": "@angular-builders/custom-webpack:dev-server",
Expand Down
12 changes: 0 additions & 12 deletions browserslist

This file was deleted.

35 changes: 0 additions & 35 deletions build/delegated.module.js

This file was deleted.

52 changes: 52 additions & 0 deletions build/delegated.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import DelegatedModule from "webpack/lib/DelegatedModule";
import { RawSource } from "webpack-sources";
import WebpackMissingModule from "./webpack-missing.module";
import { Compilation } from "webpack";

export default class DelegatedModuleCustom extends DelegatedModule {
request: any;
originalRequest: any;
dependencies: any;
userRequest: any;
webpackCompilation: Compilation;

constructor(sourceRequest, request, type, userRequest, webpackCompilation) {
super(sourceRequest, request, type, userRequest);
this.request = request;
this.webpackCompilation = webpackCompilation;
}

libIdent(options) {
if (!this.originalRequest) {
return null;
}

return typeof this.originalRequest === "string"
? this.originalRequest
: this.originalRequest.libIdent(options);
}

codeGeneration() {
const sourceModule = this.webpackCompilation.moduleGraph.getModule(this.dependencies[0])
let str;
if (!sourceModule) {
str = WebpackMissingModule.moduleCode(this.sourceRequest);
} else {
str = `module.exports = __iris_require__('${this.userRequest}')`;
}
const sources = new Map();
sources.set("javascript", new RawSource(str));
const runtimeRequirements = new Set([
"module",
"__iris_require__"
]);
return {
sources,
runtimeRequirements
}
}

sourceRequest(sourceRequest: any): any {
throw new Error("Method not implemented.");
}
}
133 changes: 0 additions & 133 deletions build/import.plugin.js

This file was deleted.

Loading