vladshcherbin / rollup-plugin-copy

Copy files and folders using Rollup
270 stars 54 forks source link

error: 'outputFolder' is not set. It is required if 'targets' is an array #80

Open stephanfriedrich opened 2 months ago

stephanfriedrich commented 2 months ago

Hi thx für your lovely plugin, i got this error. do you know how to fix this.

error during build:
[copy] [plugin copy] 'outputFolder' is not set. It is required if 'targets' is an array
    at getRollupError (file:///awesome-project/node_modules/rollup/dist/es/shared/parseAst.js:392:41)
    at error (file:///awesome-project/node_modules/rollup/dist/es/shared/parseAst.js:388:42)
    at Object.error (file:///awesome-project/node_modules/rollup/dist/es/shared/node-entry.js:19728:20)
    at Object.buildEnd (/awesome-project/node_modules/rollup-plugin-copy/dist/index.commonjs.js:44:16)
    at file:///awesome-project/node_modules/rollup/dist/es/shared/node-entry.js:19913:40
    at async Promise.all (index 3)
    at async PluginDriver.hookParallel (file:///awesome-project/node_modules/rollup/dist/es/shared/node-entry.js:19841:9)
    at async file:///awesome-project/node_modules/rollup/dist/es/shared/node-entry.js:20758:13
    at async catchUnfinishedHookActions (file:///awesome-project/node_modules/rollup/dist/es/shared/node-entry.js:20258:16)
    at async rollupInternal (file:///awesome-project/node_modules/rollup/dist/es/shared/node-entry.js:20746:5)

My specs are:

node: v20

  "devDependencies": {
    "@iconify-icons/carbon": "^1.2.20",
    "@iconify-icons/ic": "^1.2.13",
    "@iconify-icons/line-md": "^1.2.30",
    "@iconify-icons/material-symbols": "^1.2.58",
    "@iconify-icons/quill": "^1.2.5",
    "@iconify-icons/simple-icons": "^1.2.74",
    "@iconify/vue": "^4.1.2",
    "@rollup/plugin-node-resolve": "^15.2.3",
    "@rollup/plugin-replace": "^5.0.7",
    "@vitejs/plugin-legacy": "^5.4.2",
    "@vitejs/plugin-vue": "^5.1.2",
    "@vueuse/core": "^11.0.1",
    "bulma": "^1.0.2",
    "chart.js": "^4.4.4",
    "postcss": "^8.4.41",
    "postcss-import": "16.1.0",
    "postcss-nested": "6.2.0",
    "postcss-preset-env": "10.0.2",
    "postcss-sort-media-queries": "^5.2.0",
    "pug": "^3.0.3",
    "rollup-plugin-copy": "^2.0.1",
    "rollup-plugin-esbuild": "^6.1.1",
    "rollup-plugin-postcss": "^4.0.2",
    "sass": "^1.77.8",
    "terser": "^5.31.6",
    "unplugin-auto-import": "^0.16.5",
    "vite": "^5.4.2",
    "vue": "^3.4.38",
    "vue-chartjs": "^5.3.1",
    "webext-bridge": "^6.0.1",
    "webextension-polyfill": "^0.12.0"
  }
    copy({
      targets: [
        {
          src: 'src/extension/manifest.json',
          dest: 'dist/extension'
        },
        {
          src: 'src/extension/updates.json',
          dest: 'dist/extension'
        },
        {
          src: 'src/public',
          dest: 'dist/extension'
        },
      ]
    })

Have a sunny day.