Skip to content
This repository has been archived by the owner on Jul 4, 2018. It is now read-only.

feat: adding sourcemap support #16

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

mwinche
Copy link

@mwinche mwinche commented May 9, 2016

No description provided.

@mwinche
Copy link
Author

mwinche commented May 9, 2016

This should close #1

@mwinche mwinche mentioned this pull request May 9, 2016
@tennisgent
Copy link

👍

@tchock
Copy link

tchock commented Jun 1, 2016

Thank you very much man!
Unfortunately the source map fix doesn't work for me. When starting the unit test I get:

Module build failed: TypeError: Cannot read property 'sections' of undefined
    at new SourceMapConsumer (<projectPath>/node_modules/source-map/lib/source-map-consumer.js:20:19)
    at Object.module.exports (<projectPath>/node_modules/isparta-loader/index.js:34:29)

The map from the exported function is undefined.

In the webpack config I use:

config.devtool = 'inline-source-map';

and initialize with:

config.module = {
    preLoaders: [{
      test: /\.js$/,
      exclude: /node_modules/,
      loader: 'babel',
    }, {
      test: /\.js$/,
      include: [path.resolve(__dirname, '../../src')],
      loader: 'isparta',
    }],
    loaders: [],
  };

Is there something more to configure?

@mwinche
Copy link
Author

mwinche commented Jun 1, 2016

I'll take a look, there shouldn't be much config. I just applied what I've seen other loaders do to support source maps and tested it for me locally.

@gurghet
Copy link

gurghet commented Nov 30, 2016

+1

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

Successfully merging this pull request may close these issues.

4 participants