Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

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

Merged
merged 4 commits into from
Jul 29, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/schema/src/config/webpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]',
Expand Down
2 changes: 1 addition & 1 deletion test/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 => ['warning', 'warn'].includes(i.type))
pi0 marked this conversation as resolved.
Show resolved Hide resolved

expect(pageErrors).toEqual([])
expect(consoleLogErrors).toEqual([])
Expand Down