mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 09:33:54 +00:00
fix(webpack): output .mjs
to use crossorigin preloads (#6232)
This commit is contained in:
parent
e6f957ab32
commit
8b5159f3c0
@ -122,8 +122,8 @@ export default {
|
|||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
filenames: {
|
filenames: {
|
||||||
app: ({ isDev }) => isDev ? `[name].js` : `[contenthash:7].js`,
|
app: ({ isDev }) => isDev ? `[name].mjs` : `[contenthash:7].mjs`,
|
||||||
chunk: ({ isDev }) => isDev ? `[name].js` : `[contenthash:7].js`,
|
chunk: ({ isDev }) => isDev ? `[name].mjs` : `[contenthash:7].mjs`,
|
||||||
css: ({ isDev }) => isDev ? '[name].css' : 'css/[contenthash:7].css',
|
css: ({ isDev }) => isDev ? '[name].css' : 'css/[contenthash:7].css',
|
||||||
img: ({ isDev }) => isDev ? '[path][name].[ext]' : 'img/[name].[contenthash:7].[ext]',
|
img: ({ isDev }) => isDev ? '[path][name].[ext]' : 'img/[name].[contenthash:7].[ext]',
|
||||||
font: ({ isDev }) => isDev ? '[path][name].[ext]' : 'fonts/[name].[contenthash:7].[ext]',
|
font: ({ isDev }) => isDev ? '[path][name].[ext]' : 'fonts/[name].[contenthash:7].[ext]',
|
||||||
|
@ -42,7 +42,7 @@ export async function expectNoClientErrors (path: string) {
|
|||||||
const { pageErrors, consoleLogs } = await renderPage(path)
|
const { pageErrors, consoleLogs } = await renderPage(path)
|
||||||
|
|
||||||
const consoleLogErrors = consoleLogs.filter(i => i.type === 'error')
|
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(pageErrors).toEqual([])
|
||||||
expect(consoleLogErrors).toEqual([])
|
expect(consoleLogErrors).toEqual([])
|
||||||
|
Loading…
Reference in New Issue
Block a user