plasticine / inject-loader

💉📦 A Webpack loader for injecting code into modules via their dependencies.
https://www.npmjs.com/package/inject-loader
MIT License
482 stars 47 forks source link

Cannot find module 'inject!../../server' #30

Closed ghost closed 7 years ago

ghost commented 7 years ago

After running npm install inject-loader --save-dev I get this when I try use the loader through require:

const inject = require('inject!../../server')

Is there anything else that needs to be configured?

Webpack 1.13 and babel 6.2.4

loaders: [
      {
        test: /\.js$/,
        loader: 'babel',
        exclude: /(node_modules|server)/,
        query: {
          cacheDirectory: true,
          presets: ["es2015", "react", "stage-0"]
        }
      },
stephen-algeo commented 7 years ago

@lewis-elliott did you resolve this? if so what was the issue?