๐Ÿ“ฆ Akryum / meteor-vite

๐Ÿ“„ package.js ยท 43 lines
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43Package.describe({
  name: 'vite:bundler',
  version: '1.4.1',
  summary: 'Integrate the Vite.js bundler with Meteor',
  git: 'https://github.com/Akryum/meteor-vite',
  documentation: 'README.md',
})

Package.registerBuildPlugin({
  name: 'vite',
  use: [
    'ecmascript@0.16.2',
    'caching-compiler@1.2.2',
    'babel-compiler@7.9.0',
    'typescript@4.0.0',
  ],
  sources: [
    'build.js',
    'workers.ts',
  ],
  npmDependencies: {
    'execa': '6.1.0',
    'fs-extra': '10.1.0',
    'picocolors': '1.0.0',
  },
})

Npm.depends({
  picocolors: '1.0.0',
})

Package.onUse((api) => {
  api.use('isobuild:compiler-plugin@1.0.0')
  api.use('zodern:types')
  api.use('ecmascript')
  api.use('zodern:types@1.0.9')
  api.use('webapp@1.13.1')
  api.use('typescript@4.0.0')
  api.addAssets(['loading/dev-server-splash.html'], 'server')
  api.mainModule('client.ts', 'client')
  api.mainModule('vite-server.ts', 'server')
})