chocolateboy / babel-plugin-source-map-support Goto Github PK
View Code? Open in Web Editor NEWA Babel plugin which automatically makes stack traces source-map aware
License: Artistic License 2.0
A Babel plugin which automatically makes stack traces source-map aware
License: Artistic License 2.0
I know it is still in beta, but I would like to start testing this module with my app.
Doen'st work with Babel6
It concerns me that source-map-support is not yet at 1.0: evanw/node-source-map-support#223
Is there some way this excellent babel plugin can require a v1.0 package to perform the runtime mapping?
I think I'm using this correctly, but please let me know if I'm not.
My commands:
webpack
babel --plugins source-map-support build/app.js
The result:
TypeError: Plugin is not a function
at exports.default (src/plugin.js:28:12)
at Function.memoisePluginContainer (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:127:13)
at Function.normalisePlugin (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:161:32)
at /usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:197:30
at Array.map (native)
at Function.normalisePlugins (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:173:20)
at OptionManager.mergeOptions (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:271:36)
at OptionManager.init (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/options/option-manager.js:416:10)
at File.initOptions (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/index.js:190:75)
at new File (/usr/lib/node_modules/babel-cli/node_modules/babel-core/lib/transformation/file/index.js:121:22)
Is this plugin broken in Babel 6?
Hi there, trying to get your module working in attempt to fix some linenumber issues with mocha/babel.
getting the follow error:
Error: Cannot find module 'source-map-support/register'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
have the following .babelrc file where the plugin is being used:
{
"presets": ["es2015", "react", "stage-0"],
"plugins": ["transform-object-rest-spread", "transform-decorators-legacy", "transform-class-properties"],
"env": {
"test": {
"presets": ["es2015", "react", "stage-0"],
"plugins": ["transform-object-rest-spread", "transform-decorators-legacy", "transform-class-properties", "rewire", "source-map-support"],
"sourceMaps": "both"
}
}
}
and the test is run with babel-instanbul
"test:unit": "cross-env NODE_ENV=test babel-node node_modules/.bin/babel-istanbul cover --config=istanbul.json --dir coverage/unit node_modules/.bin/_mocha -- --require node_modules/ignore-styles 'client/**/*.spec.unit.js'",
its possible the error is coming from babel-istanbul as that tool is somewhat outdated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.