File tree Expand file tree Collapse file tree 6 files changed +23
-6
lines changed Expand file tree Collapse file tree 6 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 1
1
// @ts -check
2
- import path from 'node:path' ;
3
2
import { defineConfig } from '@farmfe/core' ;
4
- import { target , isProd } from '../../shared/constants.mjs' ;
3
+ import { isProd } from '../../shared/constants.mjs' ;
5
4
6
5
export default defineConfig ( {
7
6
compilation : {
Original file line number Diff line number Diff line change 1
1
// @ts -check
2
- import path from 'node:path' ;
3
2
import { defineConfig } from '@farmfe/core' ;
4
- import { target , isProd } from '../../shared/constants.mjs' ;
3
+ import { isProd } from '../../shared/constants.mjs' ;
5
4
6
5
export default defineConfig ( {
7
6
compilation : {
Original file line number Diff line number Diff line change 1
1
// @ts -check
2
- import path from 'node:path' ;
3
2
import { defineConfig } from '@farmfe/core' ;
4
- import { target , isProd } from '../../shared/constants.mjs' ;
3
+ import { isProd } from '../../shared/constants.mjs' ;
5
4
6
5
export default defineConfig ( {
7
6
compilation : {
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ export const config = {
7
7
'rolldown' ,
8
8
'webpack' ,
9
9
'esbuild' ,
10
+ 'farm' ,
10
11
] ,
11
12
defaultTools : [
12
13
'rspack' ,
@@ -16,6 +17,7 @@ export const config = {
16
17
'rolldown' ,
17
18
'webpack' ,
18
19
'esbuild' ,
20
+ 'farm' ,
19
21
] ,
20
22
dev : false ,
21
23
} ;
Original file line number Diff line number Diff line change
1
+ // @ts -check
2
+ import { defineConfig } from '@farmfe/core' ;
3
+ import { isProd } from '../../shared/constants.mjs' ;
4
+
5
+ export default defineConfig ( {
6
+ compilation : {
7
+ sourcemap : ! isProd ,
8
+ presetEnv : false ,
9
+ output : {
10
+ // Farm does not support browser-es2022 yet
11
+ targetEnv : `browser-es2017` ,
12
+ } ,
13
+ partialBundling : {
14
+ targetConcurrentRequests : 1 ,
15
+ } ,
16
+ } ,
17
+ } ) ;
Original file line number Diff line number Diff line change 6
6
"build:rspack" : " rspack build" ,
7
7
"build:rsbuild" : " rsbuild build" ,
8
8
"build:webpack" : " cross-env NODE_ENV=production webpack build" ,
9
+ "build:farm" : " farm build" ,
9
10
"build:vite" : " node ../../node_modules/vite/bin/vite.js build" ,
10
11
"build:rolldown-vite" : " node ../../node_modules/rolldown-vite/bin/vite.js build -c rolldown-vite.config.mjs" ,
11
12
"build:esbuild" : " cross-env NODE_ENV=production node esbuild.mjs"
You can’t perform that action at this time.
0 commit comments