I'm in the process of upgrading my old node 8x project to node 18.18.0. When building a webpack angularjs app I get this error and unsure how to handle this issue. Is this a bug in webpack/webpack-cli or me?
The command I run is
webpack --config webpack.dev.js -d source-map --node-env development --progress --watch
The webpack.dev.js configuration is
const webpack = require('webpack');
const commonConfigFactory = require("./webpack.common.js");
const merge = require('webpack-merge');
const path = require('path');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
const baseDir = path.resolve(__dirname);
module.exports = merge(commonConfigFactory({ ENV: 'development' }),
{
plugins: [
new BundleAnalyzerPlugin({
analyzerMode: 'static',
openAnalyzer: false,
reportFilename: 'analyze.html',
}),
],
mode: 'development',
module: {
rules: [
{ test: /\.css$/, use: 'css-loader' },
{ test: /\.ts$/, use: 'ts-loader' },
],
}
});
I've tried changing optimizations, removing optimizations entirely but nothing changes the outcome.
I was hoping to build all .ts files and produce a bundle.js file
optimization: {mangleWasmImports: true}
to yourmodule.exports
"thing"?