rollup-loader icon indicating copy to clipboard operation
rollup-loader copied to clipboard

Cannot read property 'rollup' of undefined

Open Risto-Stevcev opened this issue 5 years ago • 1 comments

I get the following error when I try to use this plugin

TypeError: Cannot read property 'rollup' of undefined
    at Object.index (/home/risto/foobar/rollup-loader/index.js:58:54)

I'm using webpack 4.3.0

Risto-Stevcev avatar May 07 '19 12:05 Risto-Stevcev

In my case I was using rollup from typescript and it was not able to be imported using the default imports convention.

The following triggered an error "TypeError: Cannot read property 'rollup' of undefined"

import rollup from "rollup";

However when I wrote it as a namespace import instead as below, the error was resolved...

import * as rollup from "rollup";

cefn avatar Dec 30 '20 14:12 cefn