Skip to content

Commit

Permalink
replace rollup-plugin-copy with vite-plugin-static-copy
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Mar 12, 2024
1 parent 4e4c243 commit f91d5f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion generators/vue/resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@
"postcss-loader": "8.1.1",
"postcss-url": "10.1.3",
"rimraf": "5.0.5",
"rollup-plugin-copy": "3.5.0",
"sass": "1.71.1",
"sass-loader": "14.1.1",
"sinon": "17.0.1",
"terser-webpack-plugin": "5.3.10",
"ts-loader": "9.5.1",
"typescript": "5.4.2",
"vite": "5.1.6",
"vite-plugin-static-copy": "1.0.1",
"vitest": "1.3.1",
"vitest-sonar-reporter": "2.0.0",
"vue-loader": "17.4.2",
Expand Down
2 changes: 1 addition & 1 deletion generators/vue/templates/package.json.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@
"cypress": "<%= nodeDependencies['cypress'] %>",
<%_ } _%>
"rimraf": "<%= nodeDependencies['rimraf'] %>",
"rollup-plugin-copy": null,
"sass": "<%= nodeDependencies['sass'] %>",
"sinon": "<%= nodeDependencies['sinon'] %>",
"swagger-ui-dist": "<%= nodeDependencies['swagger-ui-dist'] %>",
Expand All @@ -115,6 +114,7 @@
"typescript": "<%= nodeDependencies['typescript'] %>",
"vite": null,
"vitest": "<%= nodeDependencies.vitest %>",
"vite-plugin-static-copy": null,
"vitest-sonar-reporter": "<%= nodeDependencies['vitest-sonar-reporter'] %>"
},
"engines": {
Expand Down
7 changes: 3 additions & 4 deletions generators/vue/templates/vite.config.mts.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
defineConfig,
} from 'vite';
import vue from '@vitejs/plugin-vue';
import copy from 'rollup-plugin-copy';
import { viteStaticCopy } from 'vite-plugin-static-copy';
<%_ if (microfrontend) { _%>
import federation from "@originjs/vite-plugin-federation";
Expand All @@ -45,7 +45,7 @@ const swaggerUiPath = getAbsoluteFSPath();
let config = defineConfig({
plugins: [
vue(),
copy({
viteStaticCopy({
targets: [
{
src: [
Expand All @@ -54,10 +54,9 @@ let config = defineConfig({
getFileFromRepo('axios/dist/axios.min.js'),
fileURLToPath(new URL('./<%- this.relativeDir(clientRootDir, clientSrcDir) %>swagger-ui/index.html', import.meta.url)),
],
dest: '<%= this.relativeDir(clientRootDir, clientDistDir) %>swagger-ui',
dest: 'swagger-ui',
},
],
hook: 'writeBundle',
}),
],
root: fileURLToPath(new URL('./<%- this.relativeDir(clientRootDir, clientSrcDir) %>', import.meta.url)),
Expand Down

0 comments on commit f91d5f5

Please sign in to comment.