@granite-js/mpack 0.1.28 → 0.1.29

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,15 @@
1
1
  # @granite-js/mpack
2
2
 
3
+ ## 0.1.29
4
+
5
+ ### Patch Changes
6
+
7
+ - ed4cdbf: support additional metro config options from granite.config.ts
8
+ - Updated dependencies [ed4cdbf]
9
+ - @granite-js/plugin-core@0.1.29
10
+ - @granite-js/devtools-frontend@0.1.29
11
+ - @granite-js/utils@0.1.29
12
+
3
13
  ## 0.1.28
4
14
 
5
15
  ### Patch Changes
@@ -64,7 +64,8 @@ async function getMetroConfig({ rootPath }, additionalConfig) {
64
64
  const resolvedRootPath = await (0, import_getMonorepoRoot.getMonorepoRoot)(rootPath);
65
65
  const packageRootPath = await (0, import_utils.getPackageRoot)();
66
66
  return (0, import_loadConfig.mergeConfig)(defaultConfig, {
67
- watchFolders: [resolvedRootPath, packageRootPath],
67
+ projectRoot: additionalConfig?.projectRoot || rootPath,
68
+ watchFolders: [resolvedRootPath, packageRootPath, ...additionalConfig?.watchFolders || []],
68
69
  transformerPath: resolveVendors("metro-transform-worker/src"),
69
70
  transformer: {
70
71
  allowOptionalDependencies: true,
@@ -98,7 +99,10 @@ async function getMetroConfig({ rootPath }, additionalConfig) {
98
99
  sourceExts: [...import_constants.SOURCE_EXTENSIONS.map((extension) => extension.replace(/^\.?/, "")), "cjs", "mjs"],
99
100
  blockList: (0, import_exclusionList.default)(
100
101
  additionalConfig?.resolver?.blockList ? asArray(additionalConfig.resolver.blockList) : []
101
- )
102
+ ),
103
+ nodeModulesPaths: additionalConfig?.resolver?.nodeModulesPaths || [],
104
+ extraNodeModules: additionalConfig?.resolver?.extraNodeModules || {},
105
+ disableHierarchicalLookup: additionalConfig?.resolver?.disableHierarchicalLookup
102
106
  },
103
107
  serializer: {
104
108
  getModulesRunBeforeMainModule: () => [resolveFromRoot("react-native/Libraries/Core/InitializeCore", rootPath)],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@granite-js/mpack",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "A bundler for Granite apps",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -89,9 +89,9 @@
89
89
  "@babel/traverse": "^7.14.0",
90
90
  "@babel/types": "^7.0.0",
91
91
  "@fastify/static": "7.0.1",
92
- "@granite-js/devtools-frontend": "0.1.28",
93
- "@granite-js/plugin-core": "0.1.28",
94
- "@granite-js/utils": "0.1.28",
92
+ "@granite-js/devtools-frontend": "0.1.29",
93
+ "@granite-js/plugin-core": "0.1.29",
94
+ "@granite-js/utils": "0.1.29",
95
95
  "@inquirer/prompts": "^7.2.3",
96
96
  "@react-native-community/cli-plugin-metro": "11.3.7",
97
97
  "@react-native-community/cli-server-api": "11.3.7",