mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-04-24 04:25:34 +08:00
Update Webpack / Babel config
* Added module path in package.json * Marked as having no side-effects * Disable commonjs on build
This commit is contained in:
@@ -7,7 +7,11 @@ module.exports = {
|
||||
],
|
||||
plugins: [
|
||||
'@babel/transform-block-scoping',
|
||||
'@babel/transform-modules-commonjs',
|
||||
// NOTE(brent): Intentionally leave ES6 imports alone, they supported and
|
||||
// recommended by Webpack
|
||||
// (https://webpack.js.org/api/module-methods/#es6-recommended) and of
|
||||
// course metro
|
||||
// '@babel/transform-modules-commonjs',
|
||||
'@babel/proposal-class-properties',
|
||||
'@babel/proposal-object-rest-spread',
|
||||
],
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
"description": "Core utilities for the react-navigation framework",
|
||||
"main": "dist/index.js",
|
||||
"react-native": "dist/index.js",
|
||||
"module": "dist/index.js",
|
||||
"sideEffects": false,
|
||||
"files": [
|
||||
"dist/",
|
||||
"src/",
|
||||
|
||||
@@ -2,7 +2,7 @@ let uniqueBaseId: string = `id-${Date.now()}`;
|
||||
let uuidCount: number = 0;
|
||||
|
||||
export function _TESTING_ONLY_normalize_keys(): void {
|
||||
uniqueBaseId = 'id';
|
||||
uniqueBaseId = `id`;
|
||||
uuidCount = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default function docsUrl(path) {
|
||||
export default function docsUrl(path: string) {
|
||||
return `https://reactnavigation.org/docs/${path}`;
|
||||
}
|
||||
Reference in New Issue
Block a user