-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using babel-plugin-remove-webpack #3
Comments
Same solution :- ) |
Only both solutions don't work with how Regardless, I think maybe it's better to avoid hiding such tricky transformations but rather keep them in code to prevent errors in case babel will be replaced/deprecated in the future? Just a thought. |
Just ran 'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _App = require('../components/App');
var _App2 = _interopRequireDefault(_App);
var _Index = require('../components/Index');
var _Index2 = _interopRequireDefault(_Index);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
// polyfill webpack require.ensure
if (typeof require.ensure !== 'function') require.ensure = function (d, c) {
return c(require);
};
exports.default = {
path: '/',
component: _App2.default,
getChildRoutes: function getChildRoutes(location, cb) {
(function () {
cb(null, [require('./AboutRoute')]);
})();
},
indexRoute: {
component: _Index2.default
}
}; Am I missing something? Why wouldn't that work? The only thing I see about this repo off-hand is that it uses Babel 5. |
I just published my first babel plugin,
babel-plugin-remove-webpack
. It automatically rewrites calls torequire.ensure
andrequire.include
so the developer doesn't have to worry about them. A suggestion came up over at reddit that I talk with you guys about using it over here.I'm open to your thoughts and suggestions.
The text was updated successfully, but these errors were encountered: