Commit 1e83fd4 1 parent 8ebc593 commit 1e83fd4 Copy full SHA for 1e83fd4
File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 1
- name : Build and Check Code
1
+ name : Build osrd-ui
2
2
3
3
on : [push]
4
4
Original file line number Diff line number Diff line change 20
20
"rollup" : " rollup -c" ,
21
21
"clean" : " rimraf dist" ,
22
22
"build" : " npm run rollup" ,
23
- "watch" : " rollup -c -w"
23
+ "watch" : " NODE_ENV=development rollup -c -w"
24
24
},
25
25
"peerDependencies" : {
26
26
"react" : " >=18.0"
Original file line number Diff line number Diff line change @@ -3,8 +3,10 @@ import terser from '@rollup/plugin-terser';
3
3
import typescript from '@rollup/plugin-typescript' ;
4
4
import livereload from 'rollup-plugin-livereload' ;
5
5
import postcss from 'rollup-plugin-postcss' ;
6
+ import process from 'process' ;
6
7
7
8
const formats = [ 'esm' ] ;
9
+ const isDev = process . env . NODE_ENV === 'development' ;
8
10
9
11
/** @type {import("rollup").RollupOptions } */
10
12
export default {
@@ -24,9 +26,10 @@ export default {
24
26
plugins : [ ] ,
25
27
} ) ,
26
28
terser ( ) ,
27
- // livereload({
28
- // watch: 'dist',
29
- // }),
29
+ isDev &&
30
+ livereload ( {
31
+ watch : 'dist' ,
32
+ } ) ,
30
33
] ,
31
34
external : [ 'react' ] ,
32
35
} ;
You can’t perform that action at this time.
0 commit comments