sindresorhus / gulp-zip

ZIP compress files
MIT License
270 stars 47 forks source link

import zip from 'gulp-zip' not working!? #125

Closed blaasvaer closed 3 weeks ago

blaasvaer commented 3 weeks ago

import zip from 'gulp-zip'; ^^^^^^

SyntaxError: Cannot use import statement outside a module

I'm using this at the top of my gulpfile.js.

sindresorhus commented 3 weeks ago

https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c

blaasvaer commented 3 weeks ago

Problem is my main in package.json is not pointing to your specific module, I'm pointing to 'index.js' which is my entrypoint. I don't know why one would expect the use of this module in this way by default.

blaasvaer commented 3 weeks ago

I down graded to v5 and can now use require and get on with my life.