Open dreef3 opened 7 years ago
@shlomiassaf It says An error occurred while generating the build script.
on Travis, no idea how to fix this...
@dreef3 can you elaborate a bit more on the issue?
@shlomiassaf,
The comment above is the error from Travis CI, somehow the build doesn't start at all.
The issue that I'm trying to fix in this PR is reproduced with setup from README on webpack@3. It appears that loaders pass compilation
instead of compiler
object to function findPlugin
. Compared with code in webpack-wrapper.js itself:
https://github.com/shlomiassaf/ngc-webpack/blob/master/src/webpack-wrapper.ts#L43 https://github.com/shlomiassaf/ngc-webpack/blob/master/src/aot-clean-transformer/loader/text-based-loader/loader.ts#L238
@dreef3 Something doesn't fit.
1) there's a Typescript change you did which is not related to webpack...
2) the project is based on webpack 2, you did not update the package.json files so it still runs on webpack 2 which ofcourse fails with changes for wabpack 3.
3) Webpack 2 is still widely used, a change must be backward compatible.
ts.updateProperty
accepts 7 arguments instead of 6 since typescript 2.5:
function updateProperty(node: PropertyDeclaration, decorators: ReadonlyArray<Decorator> | undefined, modifiers: ReadonlyArray<Modifier> | undefined, name: string | PropertyName, questionToken: QuestionToken | undefined, type: TypeNode | undefined, initializer: Expression | undefined): PropertyDeclaration;
https://github.com/Microsoft/TypeScript/blob/v2.5.3/lib/typescript.d.ts#L3141
Maybe its better to add typescript <= 2.4
to peerDependencies instead.
plugins
property on Compilation:
https://github.com/webpack/webpack/blob/v2.7.0/lib/Compilation.js#L50
https://github.com/webpack/webpack/blob/v3.8.1/lib/Compilation.js#L53I'm not sure what causes the build in Travis to fail. There're no logs related to the project itself. I executed npm run ci
locally and it passed (that's when I discovered p.1 above)
@dreef3 Due to changes in angular 5 i'v refactor the while library. There are no transformers anymore...
Otherwise causes the following error, webpack@3: