Questions tagged [webpack-loader]
141 questions
0
votes
1 answer
import test from "css-loader!./test.css" returns string
Preface
I know close to zero about Webpack, Babel, Loaders and how they interact.
Problem description
I develop an Angular component library that I recently migrated to Angular 12. I am currently setting up Storybook for documentation.
I wanted to…

Markus Windhager
- 56
- 8
0
votes
1 answer
Webpack Module parse failed with bootstrap css
I'm trying to build with webpack
npm run build
But I get the following error
ERROR in ./node_modules/bootstrap/dist/css/bootstrap.min.css 1:0
Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this…

ninsau
- 518
- 2
- 5
- 18
0
votes
0 answers
Webpack 5 File Shadowing loader
We are currently using a file shadowing mechanism similar to the gatsby file shadowing:
https://www.gatsbyjs.com/docs/conceptual/how-shadowing-works/
With this solution we were able to have one next.js repository and build for different clients and…

Michael Kuczera
- 13
- 4
0
votes
1 answer
Webpack loader for file, subfiles and add them to tracking list
I have the map+tilemap project created in a 3rd-party app. The whole project is a set of files, the main file (XML) representing the 2D game level map and some other files (subfiles) representing graphics and tilemaps.
I am trying to create a…

Epsiloncool
- 1,435
- 16
- 39
0
votes
1 answer
Webpack loader isn't called with sass local imports
I'm working on a webpack loader that should modify the content of a sass file in some way. the issue is that this loader isn't being called except when I import the sass file within JS so
✅ This will trigger a loader call
File.js
import…

Ibrahim Rahhal
- 323
- 2
- 9
0
votes
1 answer
Webpack not recognizing css-loader
My app runs normally with yarn, but cannot load the css when I use a benchmarking library react-benchmark, which uses webpack. An minimal example of the entire project is here: https://github.com/dustinfreeman/bug-react-benchmark-css-import
Here is…

escapecharacter
- 954
- 2
- 12
- 29
0
votes
1 answer
Is it possible to mix the ts-loader and esbuild-loader?
Is there a way to mix the esbuild-loader and ts-loader? So that all .ts files are compiled with esbuild - except if there are decorators in the file then the files are compiled with tsc?

Thomaschaaf
- 17,847
- 32
- 94
- 128
0
votes
2 answers
Module source is undefined following Webpack 5 Loader Guide
I'm trying to follow the guide to Writing a Loader using Webpack 5.2.0. At the bottom of the page we are guided through a simple Jest test sample. The Jest test checks that the first module object source property is the source that our loader…

pglezen
- 961
- 8
- 18
0
votes
1 answer
Webpack 2.7.0 LoaderRunnerError: Module '*\node_modules\less\index.js' is not a loader (must have normal or pitch function)
I have this > 5 years old Angular 1.5.8 project developed by someone else, using webpack 2.7.0. It currently fails building. The error seems to be encountered at the very first .css file, which happens to be angular-material.css:
[96]…

tao
- 82,996
- 16
- 114
- 150
0
votes
1 answer
webpack not code splitting entrypoints into separate output files
I'm trying to turn a directory of markdown files into javascript files i can import() at runtime. I have a webpack loader that turns .mdx markdown files into JSX (and then uses babel to transform jsx to js).
Currently they're all emitted as a single…

DanielFGray
- 61
- 1
- 4
0
votes
1 answer
Webpack Vue SFC default lang
Any way to change the default lang attr for Vue single file components loaded with Webpack?
I'm referring to