Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Webpack Support #125

Open
ilyaigpetrov opened this issue May 12, 2017 · 1 comment
Open

Webpack Support #125

ilyaigpetrov opened this issue May 12, 2017 · 1 comment

Comments

@ilyaigpetrov
Copy link

ilyaigpetrov commented May 12, 2017

Webpack documentation suggests using transform-loader for converting browserify transforms to webpack loaders, but when started it throws error:
Error: It appears that you're trying to require sheetify in the browser but it wasn't caught by the browserify transform. Either the transform has not been enabled, or the require statement could not be statically resolved..
I guess it is because of browser field in the package.json which is used for:

...the entry point when the module is packaged by a bundler for browser use.

So webpack2 bundles packages for a browser use, that seems logical to use browser field and sheetify refuses to expose it. Who's fault is it? How to fix it?

Update

I don't think that fixing browser field will be enough because webpack2 won't be able to convert const fs = require('fs') in your index.js.

@yoshuawuyts
Copy link
Contributor

I think you probably want to require sheetify/transform until #126 lands ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants