webpack / loader-runner

Runs (webpack) loaders
MIT License
302 stars 60 forks source link

ES6 import error #38

Closed xgqfrms closed 3 years ago

xgqfrms commented 4 years ago

ES6 import error

// error
import { runLoaders } from "loader-runner";

image

// OK
const { runLoaders } = require(`loader-runner`);

image

Randy808 commented 3 years ago

There's not a lot of information to go off of in your issue. If you're implying import { runLoaders } from "loader-runner"; doesn't work, I've tried it and wasn't able to reproduce your error. This may be a problem related to your environment rather than the codebase itself. If that makes sense then I'd suggest closing this issue and opening a StackOverflow question instead. If you still believe it's a problem with the code base, posting the entire error returned from you first screenshot (as text and not a picture) and the contents of your index.js file would help in debugging your issue.