Created
September 26, 2016 21:20
-
-
Save MrRoyce/3ba2f36e50cab5fc8c3c17122f8c0e6d to your computer and use it in GitHub Desktop.
bable.prod.js to debug Module not found: Error: Cannot resolve module 'babel-runtime'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const | |
path = require('path') | |
; | |
module.exports = { | |
babelrc: false, | |
presets: [ | |
'babel-preset-es2015', | |
'babel-preset-es2016', | |
'babel-preset-react' | |
].map(require.resolve), | |
plugins: [ | |
'babel-plugin-syntax-trailing-function-commas', | |
'babel-plugin-syntax-async-functions', | |
'babel-plugin-transform-class-properties', | |
'babel-plugin-transform-regenerator', | |
'babel-plugin-transform-object-rest-spread', | |
'babel-plugin-transform-react-constant-elements' | |
].map(require.resolve).concat([ | |
[require.resolve('babel-plugin-transform-runtime'), { | |
helpers: false, | |
polyfill: false, | |
regenerator: true, | |
moduleName: path.dirname(require.resolve('babel-runtime/package')) | |
}] | |
]) | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment