提交 a8aa15af 编写于 作者: M Maël Nison 提交者: Joe Haddad

Adds basic support for PnP (#8427)

* Adds basic support for PnP

* Update preset.ts

* Update next-babel-loader.js
上级 3fa7c128
......@@ -142,6 +142,7 @@ module.exports = (
helpers: true,
regenerator: true,
useESModules: supportsESM && presetEnvConfig.modules !== 'commonjs',
absoluteRuntime: (process.versions as any).pnp ? __dirname : undefined,
...options['transform-runtime'],
},
],
......
......@@ -163,7 +163,7 @@ module.exports = babelLoader.custom(babel => {
}
options.plugins.push([
'transform-define',
require.resolve('babel-plugin-transform-define'),
{ 'typeof window': isServer ? 'undefined' : 'object' },
'next-js-transform-define-instance'
])
......
......@@ -72,6 +72,7 @@
"autodll-webpack-plugin": "0.4.2",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "8.0.6",
"babel-plugin-syntax-jsx": "6.18.0",
"babel-plugin-transform-define": "1.3.1",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"chalk": "2.4.2",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册