@liujitcn/kratos-taro-app-cli 0.0.18 → 0.0.19
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/package.json +1 -1
- package/src/index.mjs +8 -2
package/package.json
CHANGED
package/src/index.mjs
CHANGED
|
@@ -28,7 +28,7 @@ export function scaffoldKratosTaroApp(targetPath, options = {}) {
|
|
|
28
28
|
write(
|
|
29
29
|
target,
|
|
30
30
|
'.gitignore',
|
|
31
|
-
'node_modules\ndist\n.kratos-taro-app-pages-state.json\napps/taro-app/src/pages/*\n!apps/taro-app/src/pages/bootstrap/\n!apps/taro-app/src/pages/bootstrap/**\napps/taro-app/src/pages?*/\n',
|
|
31
|
+
'node_modules\ndist\n.kratos-taro-app-pages-state.json\n.kratos-taro-app-pages-state.json.*\napps/taro-app/src/pages/*\n!apps/taro-app/src/pages/bootstrap/\n!apps/taro-app/src/pages/bootstrap/**\napps/taro-app/src/pages?*/\n',
|
|
32
32
|
)
|
|
33
33
|
write(
|
|
34
34
|
target,
|
|
@@ -476,7 +476,13 @@ const packageNames = ${JSON.stringify(packageNames, null, 2)}
|
|
|
476
476
|
const hostRequire = createRequire(resolve(__dirname, '../package.json'))
|
|
477
477
|
|
|
478
478
|
export default defineConfig<'webpack5'>(async (merge) => {
|
|
479
|
-
const outputRoot =
|
|
479
|
+
const outputRoot =
|
|
480
|
+
process.env.KRATOS_TARO_OUTPUT_ROOT ||
|
|
481
|
+
(process.env.TARO_ENV === 'h5'
|
|
482
|
+
? 'dist/h5'
|
|
483
|
+
: process.env.TARO_ENV === 'weapp'
|
|
484
|
+
? 'dist/mp-weixin'
|
|
485
|
+
: 'dist')
|
|
480
486
|
const publicPath = process.env.KRATOS_TARO_PUBLIC_PATH || '/'
|
|
481
487
|
const apiTargetUrl = process.env.KRATOS_TARO_API_URL || 'http://localhost:7001'
|
|
482
488
|
const packageRoots = Object.fromEntries(
|