-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade dependencies version * upgrade version to 5.3.0 * upgrade schematics to 11.1 * use AngularWebpackPlugin instead of AngularCompilerPlugin * update filter value on prime
- Loading branch information
1 parent
dc47127
commit f8d03fa
Showing
25 changed files
with
1,676 additions
and
1,705 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 26 additions & 26 deletions
52
projects/narik-cli/schematics/ng-add/files/extra-webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
const path = require("path"); | ||
const AngularCompilerPlugin = require("@ngtools/webpack/src"); | ||
const LayoutResolver = require("./build-tools/layout-resolver"); | ||
const path = require('path'); | ||
const AngularCompilerPlugin = require('@ngtools/webpack/src'); | ||
const LayoutResolver = require('./build-tools/layout-resolver'); | ||
|
||
module.exports = (config) => { | ||
const index = config.plugins.findIndex((p) => { | ||
return p instanceof AngularCompilerPlugin.AngularCompilerPlugin; | ||
}); | ||
const oldOptions = config.plugins[index]._options; | ||
oldOptions.directTemplateLoading = false; | ||
config.plugins.splice(index); | ||
const index = config.plugins.findIndex((p) => { | ||
return p instanceof AngularCompilerPlugin.ivy.AngularWebpackPlugin; | ||
}); | ||
const oldOptions = config.plugins[index].pluginOptions; | ||
oldOptions.directTemplateLoading = false; | ||
config.plugins.splice(index); | ||
|
||
config.plugins.push( | ||
new AngularCompilerPlugin.AngularCompilerPlugin(oldOptions) | ||
); | ||
config.plugins.push( | ||
new AngularCompilerPlugin.ivy.AngularWebpackPlugin(oldOptions) | ||
); | ||
|
||
config.module.rules.unshift({ | ||
test: /\.html?$/, | ||
use: [ | ||
"raw-loader", | ||
{ | ||
loader: "@narik/webpack-tools", | ||
options: { | ||
resolver: new LayoutResolver(), | ||
basePath: config.plugins[index]._basePath, | ||
}, | ||
}, | ||
], | ||
}); | ||
config.module.rules.unshift({ | ||
test: /\.html?$/, | ||
use: [ | ||
'raw-loader', | ||
{ | ||
loader: '@narik/webpack-tools', | ||
options: { | ||
resolver: new LayoutResolver(), | ||
basePath: path.dirname(oldOptions.tsconfig), | ||
}, | ||
}, | ||
], | ||
}); | ||
|
||
return config; | ||
return config; | ||
}; |
Oops, something went wrong.