Skip to content
This repository has been archived by the owner on Sep 7, 2020. It is now read-only.

Commit

Permalink
@phenomic/cli: Use a dump babel-preset-(env|react) to cover most …
Browse files Browse the repository at this point in the history
…use case for node executed code

Closes #1170
  • Loading branch information
MoOx committed Sep 30, 2017
1 parent ab6455d commit 98bdfa4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion packages/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ process.env.BABEL_ENV = "development";
// this babel register is mainly so you can have a webpack config file in es6
// without a .babel extension
require("babel-register")({
presets: [require.resolve("@phenomic/babel-preset")],
presets: [
// used to allow import/export
// see https://github.com/phenomic/phenomic/issues/1170
require.resolve("babel-preset-env"),
// used to allow react/flow in Html.js for plugin react
// @todo: consider moving babel-register in this plugin for this file only?
require.resolve("babel-preset-react")
],
sourceMap: "inline"
});

Expand Down
3 changes: 2 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
},
"files": ["index.js", "lib"],
"dependencies": {
"@phenomic/babel-preset": "^1.0.0-alpha.10",
"@phenomic/core": "^1.0.0-alpha.10",
"babel-register": "^6.24.0",
"babel-preset-env": "^1.6.0",
"babel-preset-react": "^6.24.0",
"chalk": "^1.1.3",
"debug": "^2.6.0",
"semver": "^5.3.0",
Expand Down

0 comments on commit 98bdfa4

Please sign in to comment.