오윤석

static image 복사하도록 rollup script 수정

This diff is collapsed. Click to expand it.
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
16 "svelte": "^3.0.0" 16 "svelte": "^3.0.0"
17 }, 17 },
18 "dependencies": { 18 "dependencies": {
19 - "sirv-cli": "^0.4.4" 19 + "rollup-plugin-copy": "^3.3.0",
20 + "sirv-cli": "^0.4.4",
20 } 21 }
21 } 22 }
......
...@@ -3,6 +3,7 @@ import resolve from '@rollup/plugin-node-resolve'; ...@@ -3,6 +3,7 @@ import resolve from '@rollup/plugin-node-resolve';
3 import commonjs from '@rollup/plugin-commonjs'; 3 import commonjs from '@rollup/plugin-commonjs';
4 import livereload from 'rollup-plugin-livereload'; 4 import livereload from 'rollup-plugin-livereload';
5 import { terser } from 'rollup-plugin-terser'; 5 import { terser } from 'rollup-plugin-terser';
6 +import copy from 'rollup-plugin-copy';
6 7
7 const production = !process.env.ROLLUP_WATCH; 8 const production = !process.env.ROLLUP_WATCH;
8 9
...@@ -36,6 +37,12 @@ export default { ...@@ -36,6 +37,12 @@ export default {
36 }), 37 }),
37 commonjs(), 38 commonjs(),
38 39
40 + copy({
41 + targets:[
42 + { src:'src/images', dest:'public' }
43 + ]
44 + }),
45 +
39 // In dev mode, call `npm run start` once 46 // In dev mode, call `npm run start` once
40 // the bundle has been generated 47 // the bundle has been generated
41 !production && serve(), 48 !production && serve(),
......