Closed akhilesh-bangalore closed 4 years ago
I have resolved this by moving the import './polyfills.ts'
statement from main.ts
to webpack.config.js
.
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: ["./src/app/polyfills.ts", "./src/app/main.ts"],
output: {
filename: "bundle.js",
path: path.join(__dirname, "src", "dist")
},
resolve: {
// Add '.ts' and '.tsx' as a resolvable extension.
extensions: [".webpack.js", ".web.js", ".ts", ".tsx", ".js"]
},
module: {
loaders: [
// all files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'
{ test: /\.tsx?$/, loader: "ts-loader" }
]
},
plugins: [
new webpack.ContextReplacementPlugin(
// if you have anymore problems tweet me at @gdi2290
// The (\\|\/) piece accounts for path separators for Windows and MacOS
/(.+)?angular(\\|\/)core(.+)?/,
path.join(__dirname, 'src'), // location of your src
{} // a map of your routes
)
]
};
Hi,
I was going over your lectures one step at a time and at step 7, I see the below error when running in
Angular 9 + AngularJS 1.7.9
hybrid. Can you please help?