1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00

Add react-require to avoid importing React (#295)

* Add react-require

* Add babel-plugin-react-require
This commit is contained in:
Jonas Windey 2016-11-28 12:46:42 +01:00 committed by Guillermo Rauch
parent fcd59adea1
commit 10b815b9c9
2 changed files with 2 additions and 0 deletions

View file

@ -33,6 +33,7 @@
"babel-generator": "6.19.0",
"babel-loader": "6.2.8",
"babel-plugin-module-resolver": "2.3.0",
"babel-plugin-react-require": "^3.0.0",
"babel-plugin-transform-async-to-generator": "6.16.0",
"babel-plugin-transform-class-properties": "6.19.0",
"babel-plugin-transform-object-rest-spread": "6.19.0",

View file

@ -118,6 +118,7 @@ export default async function createCompiler (dir, { hotReload = false, dev = fa
query: {
presets: ['es2015', 'react'],
plugins: [
require.resolve('babel-plugin-react-require'),
require.resolve('babel-plugin-transform-async-to-generator'),
require.resolve('babel-plugin-transform-object-rest-spread'),
require.resolve('babel-plugin-transform-class-properties'),