File tree 4 files changed +3
-426
lines changed
4 files changed +3
-426
lines changed Original file line number Diff line number Diff line change 28
28
run : yarn build
29
29
- name : Check for SSR compat
30
30
run : node dist/index.cjs && node dist/index.js
31
- - name : Check tree-shaking
32
- run : npx agadoo@latest dist/index.js
33
31
- name : Check NPM config
34
32
run : npx publint@latest dist
35
33
release :
Original file line number Diff line number Diff line change 36
36
},
37
37
"sideEffects" : false ,
38
38
"devDependencies" : {
39
- "@babel/core" : " ^7.22.20" ,
40
- "@types/babel__core" : " ^7.20.2" ,
41
39
"@types/node" : " ^20.6.3" ,
42
40
"@types/three" : " ^0.128.0" ,
43
41
"copyfiles" : " ^2.4.1" ,
Original file line number Diff line number Diff line change 1
1
import * as path from 'node:path'
2
- import * as babel from '@babel/core'
3
2
import { defineConfig } from 'vite'
4
3
5
4
export default defineConfig ( {
@@ -14,33 +13,9 @@ export default defineConfig({
14
13
} ,
15
14
rollupOptions : {
16
15
external : ( id : string ) => ! id . startsWith ( '.' ) && ! path . isAbsolute ( id ) ,
17
- } ,
18
- } ,
19
- plugins : [
20
- {
21
- name : 'vite-tree-shake' ,
22
- renderChunk : {
23
- order : 'post' ,
24
- async handler ( code ) {
25
- function annotate ( path : babel . NodePath ) : void {
26
- if ( ! path . getFunctionParent ( ) ) {
27
- path . addComment ( 'leading' , '@__PURE__' )
28
- }
29
- }
30
-
31
- return babel . transform ( code , {
32
- sourceMaps : true ,
33
- plugins : [
34
- {
35
- visitor : {
36
- CallExpression : annotate ,
37
- NewExpression : annotate ,
38
- } ,
39
- } ,
40
- ] ,
41
- } ) as any
42
- } ,
16
+ output : {
17
+ preserveModules : true ,
43
18
} ,
44
19
} ,
45
- ] ,
20
+ } ,
46
21
} )
You can’t perform that action at this time.
0 commit comments