Giter VIP home page Giter VIP logo

Comments (7)

oviava avatar oviava commented on May 30, 2024 2
function inject(source) {
  this.cacheable && this.cacheable();
  return 'module.exports = ' + createInjectorFunction(this, source);
}

// Object.defineProperty(exports, "__esModule", {
//   value: true
// });
// exports.default = inject;

module.exports = inject;

a bit of hit & miss as I don't understand webpack loader system that well but this fixed it for me

from inject-loader.

zincli avatar zincli commented on May 30, 2024 1

hey man, I guess you made a mistake on return value. like @oviava said

function inject(source) {
  this.cacheable && this.cacheable();
  return 'module.exports = ' + createInjectorFunction(this, source);
}

the return value should be a module, it should export some thing. so module.exports here should not omit.

#19 got everything broken.

from inject-loader.

plasticine avatar plasticine commented on May 30, 2024

@Aaronius thanks will have a look πŸ‘πŸΌ

from inject-loader.

lvthanh101 avatar lvthanh101 commented on May 30, 2024

hi @plasticine, do you have plan to fix this bug?

from inject-loader.

plasticine avatar plasticine commented on May 30, 2024

@lvthanh101 Yep, just haven’t had time. Hopefully soon.

from inject-loader.

zincli avatar zincli commented on May 30, 2024

https://github.com/plasticine/inject-loader/blob/master/lib/index.js#L107 here's the problem

from inject-loader.

plasticine avatar plasticine commented on May 30, 2024

Please check out 3.0.0-beta3 which should fix this issue and also introduces support for webpack2.

from inject-loader.

Related Issues (20)

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.