fixed to template PR issues, #13938

This commit is contained in:
Torkel Ödegaard
2018-11-02 10:49:46 +01:00
parent 70bb81c6eb
commit b415d82611
12 changed files with 89 additions and 8 deletions

View File

@@ -47,7 +47,7 @@ module.exports = {
},
{
test: /\.html$/,
exclude: /(index|error)\.template\.html/,
exclude: /(index|error)\-template\.html/,
use: [
{ loader: 'ngtemplate-loader?relativeTo=' + (path.resolve(__dirname, '../../public')) + '&prefix=public' },
{

View File

@@ -84,12 +84,12 @@ module.exports = merge(common, {
}),
new HtmlWebpackPlugin({
filename: path.resolve(__dirname, '../../public/views/error.html'),
template: path.resolve(__dirname, '../../public/views/error.template.html'),
template: path.resolve(__dirname, '../../public/views/error-template.html'),
inject: 'false',
}),
new HtmlWebpackPlugin({
filename: path.resolve(__dirname, '../../public/views/index.html'),
template: path.resolve(__dirname, '../../public/views/index.template.html'),
template: path.resolve(__dirname, '../../public/views/index-template.html'),
inject: 'body',
chunks: ['manifest', 'vendor', 'app'],
}),

View File

@@ -87,7 +87,7 @@ module.exports = merge(common, {
new CleanWebpackPlugin('../public/build', { allowExternal: true }),
new HtmlWebpackPlugin({
filename: path.resolve(__dirname, '../../public/views/index.html'),
template: path.resolve(__dirname, '../../public/views/index.template.html'),
template: path.resolve(__dirname, '../../public/views/index-template.html'),
inject: 'body',
alwaysWriteToDisk: true
}),

View File

@@ -76,13 +76,13 @@ module.exports = merge(common, {
new ngAnnotatePlugin(),
new HtmlWebpackPlugin({
filename: path.resolve(__dirname, '../../public/views/index.html'),
template: path.resolve(__dirname, '../../public/views/index.template.html'),
template: path.resolve(__dirname, '../../public/views/index-template.html'),
inject: 'body',
chunks: ['vendor', 'app'],
}),
new HtmlWebpackPlugin({
filename: path.resolve(__dirname, '../../public/views/error.html'),
template: path.resolve(__dirname, '../../public/views/error.template.html'),
template: path.resolve(__dirname, '../../public/views/error-template.html'),
inject: false,
}),
function () {