Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
fix(asset): respect assetFileNames if rollupOptions.output is an array (
#8561) Co-authored-by: patak-dev <matias.capeletto@gmail.com>
- Loading branch information
1 parent
5151e74
commit 4e6c26f
Showing
6 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import './style.css' | ||
import './vite.svg' | ||
|
||
async function run() { | ||
const { fn } = await import('./async.js') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import legacy from '@vitejs/plugin-legacy' | ||
import { defineConfig } from 'vite' | ||
|
||
export default defineConfig({ | ||
plugins: [legacy({ modernPolyfills: true })], | ||
build: { | ||
manifest: true, | ||
minify: false, | ||
rollupOptions: { | ||
output: [ | ||
{ | ||
assetFileNames() { | ||
return 'assets/subdir/[name].[hash][extname]' | ||
}, | ||
entryFileNames: `assets/subdir/[name].js`, | ||
chunkFileNames: `assets/subdir/[name].js` | ||
}, | ||
{ | ||
assetFileNames() { | ||
return 'assets/subdir/[name].[hash][extname]' | ||
}, | ||
entryFileNames: `assets/anotherSubdir/[name].js`, | ||
chunkFileNames: `assets/anotherSubdir/[name].js` | ||
} | ||
] | ||
} | ||
} | ||
}) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.