I'm new into webpack and trying move gulp to webpack. facing issue in "ngtemplate-loader". Below is my webpack config.
entry: {
vendor: vendorResources,
app: ["./src/app/index.module.ts"]
},
output: {
path: path.resolve(__dirname, "dist"),
filename: "scripts/[name].js",
},
devtool: "source-map",
module: {
rules: [{
test: /\.html$/,
use: [
{ loader: 'ngtemplate-loader?relativeTo=' + (path.resolve(__dirname, './src/app')) },
{ loader: 'html-loader' }
]
},
{
test: /\.ts?$/,
use: [{
loader: 'awesome-typescript-loader'
}, {
loader: 'tslint-loader'
}],
exclude: /node_modules/
}
],
},
resolve: {
extensions: [".ts", ".tsx", ".js", ".json", ".jsx", ".css", ".scss", ".sass"]
},
externals: {},
plugins: [
new ExtractTextPlugin({
filename: (getPath) => {
return getPath('styles/[name].css').replace('js', 'css');
},
allChunks: false
}),
]
I'm new into webpack and trying move gulp to webpack. facing issue in "ngtemplate-loader". Below is my webpack config.
const path = require('path');
const webpack = require("webpack");
const optimize = webpack.optimize;
const htmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const config = require('./webpack/config');
var webpackConfig = {
}
module.exports = webpackConfig;