isparta-loader
isparta-loader copied to clipboard
feat: adding sourcemap support
This should close https://github.com/deepsweet/isparta-loader/issues/1
👍
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?
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.
+1