Answer the question
In order to leave comments, you need to log in
Webpack loader swears. How to use jsx source files inside node_modules?
structure:
./node_modules/packageName/file.jsx
./main.js
import * as CUSTOM from './node_modules/packageName/file.jsx'
export function custom() {
}
ERROR in ./~/packageName/src/js/custom.jsx
Module parse failed:PATH_TO_PROJECT/node_modules/packageName/file.jsx Line 1: Unexpected token
You may need an appropriate loader to handle this file type.
| export function CUSTOM() {
| }
|
@ ./src/js/main.js
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question