fix(webpack): output .mjs to use crossorigin preloads (#6232)

This commit is contained in:
Daniel Roe 2022-07-29 13:50:02 +01:00 committed by GitHub
parent e6f957ab32
commit 8b5159f3c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -122,8 +122,8 @@ export default {
* ```
*/
filenames: {
app: ({ isDev }) => isDev ? `[name].js` : `[contenthash:7].js`,
chunk: ({ isDev }) => isDev ? `[name].js` : `[contenthash:7].js`,
app: ({ isDev }) => isDev ? `[name].mjs` : `[contenthash:7].mjs`,
chunk: ({ isDev }) => isDev ? `[name].mjs` : `[contenthash:7].mjs`,
css: ({ isDev }) => isDev ? '[name].css' : 'css/[contenthash:7].css',
img: ({ isDev }) => isDev ? '[path][name].[ext]' : 'img/[name].[contenthash:7].[ext]',
font: ({ isDev }) => isDev ? '[path][name].[ext]' : 'fonts/[name].[contenthash:7].[ext]',

View File

@ -42,7 +42,7 @@ export async function expectNoClientErrors (path: string) {
const { pageErrors, consoleLogs } = await renderPage(path)
const consoleLogErrors = consoleLogs.filter(i => i.type === 'error')
const consoleLogWarnings = consoleLogs.filter(i => i.type === 'warn')
const consoleLogWarnings = consoleLogs.filter(i => i.type === 'warning')
expect(pageErrors).toEqual([])
expect(consoleLogErrors).toEqual([])