Skip to content

Commit c7bcdc9

Browse files
committed
fix expo index.html
1 parent e117620 commit c7bcdc9

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
"node-loader": "^2.0.0",
4949
"ts-loader": "^9.4.4",
5050
"ts-node": "^10.9.1",
51-
"typescript": "~5.1.6",
52-
"webpack-node-externals": "^3.0.0"
51+
"typescript": "~5.1.6"
5352
},
5453
"packageManager": "[email protected]",
5554
"eslintConfig": {

scripts/fix-expo-bundle.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
const indexPath = path.join(__dirname, 'dist', 'index.html');
5+
let htmlContent = fs.readFileSync(indexPath, 'utf8');
6+
htmlContent = htmlContent.replace('src="/bundles', 'src="bundles');
7+
fs.writeFileSync(indexPath, htmlContent);

webpack.main.config.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import nodeExternals from 'webpack-node-externals';
2-
31
import { rules } from './webpack.rules';
42

53
import type { WebpackConfiguration } from '@electron-forge/plugin-webpack/dist/Config';
@@ -19,9 +17,5 @@ export const mainConfig: WebpackConfiguration = {
1917
extensions: ['.js', '.ts', '.jsx', '.tsx', '.css', '.json'],
2018
},
2119
target: 'electron-main',
22-
externals: [
23-
nodeExternals({
24-
allowlist: ['aws-sdk', 'mock-aws-s3', 'nock'],
25-
}),
26-
],
20+
externals: ['aws-sdk', 'mock-aws-s3', 'nock'],
2721
};

webpack.renderer.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import nodeExternals from 'webpack-node-externals';
2-
31
import { rules } from './webpack.rules';
42

53
import type { WebpackConfiguration } from '@electron-forge/plugin-webpack/dist/Config';

0 commit comments

Comments
 (0)