@dcloudio/vue-cli-plugin-hbuilderx 2.0.2-3090820231124001 → 2.0.2-4000620240325001

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.
@@ -349,6 +349,29 @@ try {
349
349
  }
350
350
  } catch (e) {}
351
351
 
352
+ let tsLoader
353
+ try {
354
+ tsLoader = require.resolve('ts-loader', {
355
+ paths: [require.resolve('@vue/cli-plugin-babel')]
356
+ })
357
+ } catch (error) {}
358
+
359
+ tsLoader && rules.push({
360
+ test: /\.ts$/,
361
+ use: [{
362
+ loader: require.resolve('babel-loader', {
363
+ paths: [require.resolve('@vue/cli-plugin-babel')]
364
+ })
365
+ }, {
366
+ loader: tsLoader,
367
+ options: Object.assign({
368
+ transpileOnly: false,
369
+ appendTsSuffixTo: ['\\.nvue$', '\\.vue$'],
370
+ happyPackMode: false
371
+ }, require('@dcloudio/vue-cli-plugin-uni/lib/util').getTsLoadOptions())
372
+ }, jsPreprocessorLoader]
373
+ })
374
+
352
375
  module.exports = function () {
353
376
  return {
354
377
  target: 'node', // 激活 vue-loader 的 isServer 逻辑
@@ -379,10 +402,11 @@ module.exports = function () {
379
402
  }),
380
403
  output: {
381
404
  path: process.env.UNI_OUTPUT_DIR,
382
- filename: '[name].js'
405
+ filename: '[name].js',
406
+ publicPath: '/'
383
407
  },
384
408
  resolve: {
385
- extensions: ['.js', '.nvue', '.vue', '.json'],
409
+ extensions: ['.ts', '.js', '.nvue', '.vue', '.json'],
386
410
  alias: {
387
411
  '@/pages.json': path.resolve(process.env.UNI_INPUT_DIR, 'pages.json') + '?' + JSON.stringify({
388
412
  type: 'origin-pages-json'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/vue-cli-plugin-hbuilderx",
3
- "version": "2.0.2-3090820231124001",
3
+ "version": "2.0.2-4000620240325001",
4
4
  "description": "HBuilderX plugin for vue-cli 3",
5
5
  "main": "index.js",
6
6
  "repository": {
@@ -18,5 +18,5 @@
18
18
  "css": "~2.2.1",
19
19
  "escodegen": "^1.8.1"
20
20
  },
21
- "gitHead": "c32691147b539a337d6bca396ba42a6c3ddc1dbf"
21
+ "gitHead": "2f9ba8ff3e3f185745faa67dd4eefaef7f3db374"
22
22
  }