@htyf-mp/cli 0.2.0-alpha.2 → 0.2.0-alpha.3

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.
@@ -7,7 +7,7 @@ import TerserPlugin from 'terser-webpack-plugin';
7
7
  import * as Repack from '@callstack/repack';
8
8
  import { ExpoModulesPlugin } from '@callstack/repack-plugin-expo-modules';
9
9
  import { ReanimatedPlugin } from '@callstack/repack-plugin-reanimated';
10
- import { HtyfModulesPlugin } from './ListImportsPlugin.mjs';
10
+ import { HtyfModulesPlugin } from './HtyfImportsPlugin.mjs';
11
11
  import { getProjectRoot } from './utils.mjs';
12
12
 
13
13
  // 获取当前文件和目录路径
@@ -60,7 +60,17 @@ export default (env = {}) => {
60
60
  if (appExposesOptions) {
61
61
  mpOptions = JSON.parse(decodeURI(appExposesOptions));
62
62
  }
63
+ console.log('\n');
64
+ console.log('=====mpOptions=====');
65
+ console.log('\n');
66
+ console.log('context:', projectRoot);
67
+ console.log('\n');
68
+ console.log('entry:', entry);
69
+ console.log('\n');
63
70
  console.log(JSON.stringify(mpOptions, null, 2));
71
+ console.log('\n');
72
+ console.log('=====mpOptions=====');
73
+ console.log('\n');
64
74
  // 基础Webpack配置
65
75
  const mpConfig = {
66
76
  context,
@@ -71,6 +81,8 @@ export default (env = {}) => {
71
81
  output: {
72
82
  // 默认输出路径,host模式下会被覆盖
73
83
  path: mpOptions.outputPath,
84
+ publicPath: mpOptions.outputPath,
85
+ // uniqueName: `htyf_mp_for_${mpOptions.name}`,
74
86
  },
75
87
  module: {
76
88
  rules: [
@@ -79,9 +91,9 @@ export default (env = {}) => {
79
91
  test: /\.[cm]?[jt]sx?$/,
80
92
  use: {
81
93
  loader: 'babel-loader',
82
- options: {
83
- configFile: path.resolve(__dirname, './babel.config.js'),
84
- }
94
+ // options: {
95
+ // configFile: path.resolve(__dirname, './babel.config.js'),
96
+ // }
85
97
  },
86
98
  type: 'javascript/auto',
87
99
  },