wwilsman/js-yaml-loader

Read yaml with function

gabrielpeixoto opened this issue · 2 comments

I am trying to read this yaml file:

function: !!js/function >
  function foobar() {
    return 'Wow! JS-YAML Rocks!';
  }

My _webpack.config.js:

    {
        test: /\.yaml$/,
        use: [{
            loader: 'js-yaml-loader',
            options: {
                safe: false
            }
        }]
    }

But i'm getting this error:
Module build failed: Error: Final loader didn't return a Buffer or String

Hey @gabrielpeixoto, thanks for opening the issue. Could you provide a repo for the project where you're seeing this happen, or maybe just a minimum reproduction of the error?

I tried reproducing it myself by copying your yaml file and webpack config but it seemed to work for me without a problem.

Screen Shot 2019-04-05 at 12 18 13 PM

It's been a few days with no reply, so I'm going to close this since I wasn't able to reproduce.