@granite-js/mpack 0.1.23-next.14 → 0.1.23-next.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,35 @@
1
1
  # @granite-js/mpack
2
2
 
3
+ ## 0.1.23-next.17
4
+
5
+ ### Patch Changes
6
+
7
+ - fix
8
+ - Updated dependencies
9
+ - @granite-js/devtools-frontend@0.1.23-next.17
10
+ - @granite-js/plugin-core@0.1.23-next.17
11
+ - @granite-js/utils@0.1.23-next.17
12
+
13
+ ## 0.1.23-next.16
14
+
15
+ ### Patch Changes
16
+
17
+ - update
18
+ - Updated dependencies
19
+ - @granite-js/devtools-frontend@0.1.23-next.16
20
+ - @granite-js/plugin-core@0.1.23-next.16
21
+ - @granite-js/utils@0.1.23-next.16
22
+
23
+ ## 0.1.23-next.15
24
+
25
+ ### Patch Changes
26
+
27
+ - fix
28
+ - Updated dependencies
29
+ - @granite-js/devtools-frontend@0.1.23-next.15
30
+ - @granite-js/plugin-core@0.1.23-next.15
31
+ - @granite-js/utils@0.1.23-next.15
32
+
3
33
  ## 0.1.23-next.14
4
34
 
5
35
  ### Patch Changes
@@ -1,7 +1,8 @@
1
1
  import { type BuildConfig } from '@granite-js/plugin-core';
2
2
  import type { BundlerConfig } from '../../types';
3
- export declare function getReactNativeSetupScripts({ rootDir }: {
3
+ export declare function getReactNativeSetupScripts({ rootDir, reactNativePath, }: {
4
4
  rootDir: string;
5
+ reactNativePath?: string;
5
6
  }): string[];
6
7
  export declare function globalVariables({ dev }: {
7
8
  dev: boolean;
@@ -36,12 +36,11 @@ __export(presets_exports, {
36
36
  module.exports = __toCommonJS(presets_exports);
37
37
  var import_path = __toESM(require("path"));
38
38
  var import_plugin_core = require("@granite-js/plugin-core");
39
- function getReactNativeSetupScripts({ rootDir }) {
40
- const reactNativePath = import_path.default.dirname(
41
- require.resolve("react-native/package.json", {
42
- paths: [rootDir]
43
- })
44
- );
39
+ var import_getDefaultReactNativePath = require("../../utils/getDefaultReactNativePath");
40
+ function getReactNativeSetupScripts({
41
+ rootDir,
42
+ reactNativePath = (0, import_getDefaultReactNativePath.getDefaultReactNativePath)(rootDir)
43
+ }) {
45
44
  return [
46
45
  ...require(import_path.default.join(reactNativePath, "rn-get-polyfills"))(),
47
46
  import_path.default.join(reactNativePath, "Libraries/Core/InitializeCore.js")
@@ -69,7 +68,10 @@ function combineWithBaseBuildConfig(config, context) {
69
68
  platform: config.buildConfig.platform,
70
69
  esbuild: {
71
70
  define: defineGlobalVariables({ dev: context.dev }),
72
- prelude: getReactNativeSetupScripts({ rootDir: context.rootDir }),
71
+ prelude: getReactNativeSetupScripts({
72
+ rootDir: context.rootDir,
73
+ reactNativePath: config.buildConfig.reactNativePath
74
+ }),
73
75
  banner: {
74
76
  js: [
75
77
  globalVariables({ dev: context.dev }),
@@ -71,7 +71,6 @@ function createFullyTransformStep({
71
71
  * @babel/preset-react 포함 필요
72
72
  */
73
73
  [require.resolve("@babel/preset-react"), { runtime: "automatic" }],
74
- [require.resolve("@react-native/babel-preset")],
75
74
  ...additionalBabelOptions?.presets ?? []
76
75
  ],
77
76
  plugins: [
@@ -0,0 +1 @@
1
+ export declare function getDefaultReactNativePath(rootDir: string): string;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var getDefaultReactNativePath_exports = {};
30
+ __export(getDefaultReactNativePath_exports, {
31
+ getDefaultReactNativePath: () => getDefaultReactNativePath
32
+ });
33
+ module.exports = __toCommonJS(getDefaultReactNativePath_exports);
34
+ var import_path = __toESM(require("path"));
35
+ function getDefaultReactNativePath(rootDir) {
36
+ return import_path.default.dirname(
37
+ require.resolve("react-native/package.json", {
38
+ paths: [rootDir]
39
+ })
40
+ );
41
+ }
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ getDefaultReactNativePath
45
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@granite-js/mpack",
3
- "version": "0.1.23-next.14",
3
+ "version": "0.1.23-next.17",
4
4
  "description": "A bundler for Granite apps",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -84,9 +84,9 @@
84
84
  "@babel/traverse": "^7.14.0",
85
85
  "@babel/types": "^7.0.0",
86
86
  "@fastify/static": "7.0.1",
87
- "@granite-js/devtools-frontend": "0.1.23-next.14",
88
- "@granite-js/plugin-core": "0.1.23-next.14",
89
- "@granite-js/utils": "0.1.23-next.14",
87
+ "@granite-js/devtools-frontend": "0.1.23-next.17",
88
+ "@granite-js/plugin-core": "0.1.23-next.17",
89
+ "@granite-js/utils": "0.1.23-next.17",
90
90
  "@inquirer/prompts": "^7.2.3",
91
91
  "@react-native-community/cli-plugin-metro": "11.3.7",
92
92
  "@react-native-community/cli-server-api": "11.3.7",