You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var webpack = require('webpack');
var path = require('path');
const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
mode: 'production',
entry: './src/index.ts',
target: 'node',
output: {
filename: 'app.js',
libraryTarget: 'commonjs2',
path: path.resolve(__dirname, 'dist'),
},
devtool: 'source-map',
optimization: {
minimize: true,
minimizer: [new TerserPlugin()],
},
resolve: {
extensions: ['.ts', '.js'],
},
module: {
rules: [
// all files with a `.ts` or `.tsx` extension will be handled by `ts-loader`
{ test: /\.tsx?$/, loader: 'ts-loader' },
],
},
};
Expected Behaviour
Running webpack --config ./webpack.config.js with any Typescript version > 5.0.4 should pass
Actual Behaviour
This is what I get when I try running webpack with any Typescript version > 5.0.4 :
Error: Could not load TypeScript. Try installing with yarn add typescript or npm install typescript. If TypeScript is installed globally, try using yarn link typescript or npm link typescript.
However, this works with any version <= 5.0.4, so, I am not sure what would be the workaround for this.
The text was updated successfully, but these errors were encountered:
Any fix here for typescript >5.0.4. I'm getting below error for the typescript 5.2.2
\tsconfig.webpack.json(12,5)
ERR! TS6266: Option 'listFilesOnly' can only be specified on command line.
ERR! Module build failed (from ../../../.store/[email protected]/node_modules/ts-loader/index.js):
ERR! Error: error while parsing tsconfig.json
ERR! at Object.loader (node-modules\[email protected]\node_modules\ts-loader\dist\index.js:18:18)
This is the webpack config file I am using :
Expected Behaviour
Running
webpack --config ./webpack.config.js
with any Typescript version > 5.0.4 should passActual Behaviour
This is what I get when I try running webpack with any Typescript version > 5.0.4 :
Error: Could not load TypeScript. Try installing with
yarn add typescript
ornpm install typescript
. If TypeScript is installed globally, try usingyarn link typescript
ornpm link typescript
.However, this works with any version <= 5.0.4, so, I am not sure what would be the workaround for this.
The text was updated successfully, but these errors were encountered: