Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix asset loading
  • Loading branch information
acoates-ms committed Apr 15, 2020
commit 00f1f97a78506f15acaeb6ac5dc32672a1d6fd0c
3 changes: 3 additions & 0 deletions packages/E2ETest/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ module.exports = {
]),
},
transformer: {
// The cli defaults this to a full path to react-native, which bypasses the reactNativePlatformResolver above
// Hopefully we can fix the default in the future
assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
Expand Down
3 changes: 3 additions & 0 deletions packages/microsoft-reactnative-sampleapps/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ module.exports = {
]),
},
transformer: {
// The cli defaults this to a full path to react-native, which bypasses the reactNativePlatformResolver above
// Hopefully we can fix the default in the future
assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
Expand Down
3 changes: 3 additions & 0 deletions packages/playground/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ module.exports = {
]),
},
transformer: {
// The cli defaults this to a full path to react-native, which bypasses the reactNativePlatformResolver above
// Hopefully we can fix the default in the future
assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
Expand Down
7 changes: 0 additions & 7 deletions packages/playground/react-native.config.js

This file was deleted.

3 changes: 3 additions & 0 deletions packages/react-native-win32/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ module.exports = {
),
},
transformer: {
// The cli defaults this to a full path to react-native, which bypasses the reactNativePlatformResolver above
// Hopefully we can fix the default in the future
assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
Expand Down
4 changes: 0 additions & 4 deletions packages/react-native-win32/react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,4 @@ module.exports = {
dependencyConfig: (projectRoot, dependencyParams) => null,
},
},

// *****
// This is only used when building bundles within react-native-win32.
reactNativePath: '.',
};
1 change: 0 additions & 1 deletion vnext/local-cli/generator-windows/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ function copyProjectTemplateAndReplace(
};

[
{ from: path.join(srcRootPath, 'react-native.config.js'), to: 'react-native.config.js' },
{ from: path.join(srcRootPath, 'metro.config.js'), to: 'metro.config.js' },
{ from: path.join(srcRootPath, '_gitignore'), to: path.join(windowsDir, '.gitignore') },
{ from: path.join(srcRootPath, 'b_gitignore'), to: path.join(windowsDir, newProjectName, bundleDir, '.gitignore') },
Expand Down
3 changes: 3 additions & 0 deletions vnext/local-cli/generator-windows/templates/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ module.exports = {
]),
},
transformer: {
// The cli defaults this to a full path to react-native, which bypasses the reactNativePlatformResolver above
// Hopefully we can fix the default in the future
assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
Expand Down

This file was deleted.

3 changes: 3 additions & 0 deletions vnext/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ module.exports = {
},
},
transformer: {
// The cli defaults this to a full path to react-native, which bypasses the reactNativePlatformResolver above
// Hopefully we can fix the default in the future
assetRegistryPath: 'react-native/Libraries/Image/AssetRegistry',
getTransformOptions: async () => ({
transform: {
experimentalImportSupport: false,
Expand Down
4 changes: 0 additions & 4 deletions vnext/react-native.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,4 @@ module.exports = {
dependencyConfig: dependencyConfig.dependencyConfigWindows,
},
},

// *****
// This is only used when building bundles within react-native-windows.
reactNativePath: '.',
};