In my angular project if we use the app is compiling and working fine if we use raw-loader@1.0.0. Whereas if we use version 2.0.0, application is not working. What would be difference between version 1 & 2?
webpack.config.ts
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
module.exports = {
entry: './src/main.ts',
resolve: {
extensions: ['.ts', '.js']
},
module: {
rules: [
{
test: /\.ts$/,
use: ['ts-loader', 'angular2-template-loader'],
exclude: /node_modules/
},
{
test: /\.(html|css)$/,
use: 'raw-loader'
}
]
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.html',
filename: 'index.html',
inject: 'body'
}),
new webpack.DefinePlugin({
config: JSON.stringify({
apiUrl: 'http://localhost:9999'
})
})
],
devServer: {
historyApiFallback: true
}
};
from Latest raw-loader version is not working in webpack. How to fix it?
No comments:
Post a Comment