216 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
-1
votes
1
answer
218
views
How to fix compilation errors when upgrading Node.js from 10 to 22 in my project?
I am trying up update the node from 10 to 22 in my project and it gives compilation error as follows.
PS D:\temp checkouts\Plugin\ep\Client\Source\src> npm run build
> [email protected] ...
0
votes
0
answers
79
views
webpack-dev-server error: "Cannot GET / "
I am trying to run a Webpack Dev Server. I am using TypeScript.
I receive the following error when I open my http://localhost:8080/ I receive the error:
Cannot GET /
Here is my webpack.config.js file:
...
0
votes
1
answer
61
views
ts-loader doesn't recognize typescript syntax
What I have:
webpack.config.js:
located in the root of project
//@ts-check
const path = require('path');
const webpack = require('webpack');
// module.exports = {
/**
* @type {import('webpack')....
2
votes
0
answers
1k
views
webpack.config.ts unable to use ts-loader for TypeScript files
I am beginning a new project which will be a React TypeScript website package, and I would like to use webpack to bundle and serve my website artifacts.
I have installed webpack, webpack-cli, and ...
1
vote
0
answers
124
views
Loader issue in react-native-web: Module parse failed: Unexpected token
I'm trying to setup React Native Web App with TypeScript and WebPack. While running the code I'm getting the around 63 errors all in node_modules
Bug Report
ERROR in ../node_modules/react-native/...
0
votes
1
answer
210
views
d.ts enum values don't end up in the compiled output
I have a project where I have a big global.d.ts file.
the project runs on webpack 4 + typescript 4 and uses the awesome-typescript-loader and babel-loader.
The project is pretty old basically.
I am ...
1
vote
0
answers
138
views
Different build result between npm and pnpm
Recently, I have used pnpm instead of npm in the program. I built the project(pnpm run build) and received a ts error. (ts-loader in the webpack) It seems a TS error. but when I used npm it didn't ...
1
vote
1
answer
697
views
Webpack + ts-loader fails on stage 3 decorators: Unexpected character '@'
The following code:
const decorator = (constructor: any, _context: any) => constructor
@decorator
export class Decorated {}
fails in Webpack + ts-loader with the message: Unexpected character '@'
...
0
votes
1
answer
903
views
Does 'ts-loader' require 'typescript' to be installed inorder to work? For me it worked fine
The npm documentation for using ts-loader suggests installing typescript and so does the official Typescript guide in webpack documentation without actually providing any reasoning behind it. For me, ...
1
vote
0
answers
69
views
How to get webpack to report typescript errors in HTML templates
I have inherited a project that is stuck on webpack 4 / angular 11 / lerna bootstrap that I am trying to upgrade to webpack 5 / workspaces etc. and it's like a Rubix cube (or Lament Configuration), so ...
0
votes
1
answer
35
views
Webpack can't seem to load css
I am trying to create a npm package for a single .tsx component however When I run wepback I keep getting this error:
ERROR in ./src/Chatbot.tsx 184:20
Module parse failed: Unexpected token (184:20)
...
3
votes
0
answers
2k
views
How to properly configure swc-loader with webpack, when switching from ts-loader for better build performance
I have a ts-loader configuration in webpack,
test: /\.tsx?$/,
use: [
{
loader: 'ts-loader',
options: {
transpileOnly: true
}
}
]
This was taking like 5 mins of build time.
so, ...
0
votes
1
answer
703
views
How to replace angular2-template-loader in Webpack 5 with ts-loader
I've inherited a Webpack4 Angular 11 lerna bootstrap repo, and I'd like to get us on Webpack5 (as well as workspaces etc.)
This repo uses angular2-template-loader with ts-loader and fork-ts-checker-...
2
votes
1
answer
977
views
Getting empty object on importing react component from library even after adding output.library in webpack config
I'm writing a sample typescript react component library with folder structure as shown below, exporting just 1 button component. On running npm run build, just one js bundle is generated. The bundle ...
0
votes
1
answer
750
views
Webpack warns "module not found" on Typescript declaration
I'm trying to create an isomorphic Typescript library that exports a function--let's call it myFunc--that has different logic and uses different internal types depending on whether it is compiled for ...