Git Product home page Git Product logo

Comments (3)

msakrejda avatar msakrejda commented on August 20, 2024

I replaced my (emscripten-generated) actual worker code with a dummy implementation that just errors out, and that seems to work fine, so pretty sure there's not actually a gatsby-plugin-workerize-loader bug here, though if you have any ideas, I'd love to hear them. Otherwise feel free to close this and sorry for the noise.

from gatsby-plugin-workerize-loader.

universse avatar universse commented on August 20, 2024

Do you have a minimal reproduction?

from gatsby-plugin-workerize-loader.

msakrejda avatar msakrejda commented on August 20, 2024

I don't, but I did figure out my issue: I had to set USE_ES6_IMPORT_META=0 in the Emscripten compilation. It looks like the webpack config Gatsby 2 is using does not support import.meta, and I was getting the strange behavior above in gatsby develop. When I had tried gatsby build, I got a different failure:

failed Building production JavaScript and CSS bundles - 38.768s

ERROR #98123  WEBPACK

Generating JavaScript bundles failed

Unexpected token (1:43)

File: src/vendor/foo/bar.js:1:43

(I'm not sure if 1:43 is supposed to be the line/column or what--it does not correspond to the import.meta reference and the first line doesn't even have 43 characters.)

But with the Emscripten setting above, the generated code does not include any import.meta references and works fine with gatsby-plugin-workerize-loader.

Sorry for the noise--hope this is useful if someone else runs across something similar.

from gatsby-plugin-workerize-loader.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.