mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-26 23:52:06 +00:00
fix(config): prevent invalid css filenames in webpack output (#8778)
This commit is contained in:
parent
d343d85985
commit
073157f535
@ -16,7 +16,7 @@ export default () => ({
|
||||
// { isDev, isClient, isServer }
|
||||
app: ({ isDev, isModern }) => isDev ? `[name]${isModern ? '.modern' : ''}.js` : `[contenthash:7]${isModern ? '.modern' : ''}.js`,
|
||||
chunk: ({ isDev, isModern }) => isDev ? `[name]${isModern ? '.modern' : ''}.js` : `[contenthash:7]${isModern ? '.modern' : ''}.js`,
|
||||
css: ({ isDev }) => isDev ? '[name].css' : '[name].[contenthash:7].css',
|
||||
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]',
|
||||
video: ({ isDev }) => isDev ? '[path][name].[ext]' : 'videos/[name].[contenthash:7].[ext]'
|
||||
|
@ -17,7 +17,7 @@ describe('config: build', () => {
|
||||
const env = { isDev: false }
|
||||
expect(filenames.app(env)).toEqual('[contenthash:7].js')
|
||||
expect(filenames.chunk(env)).toEqual('[contenthash:7].js')
|
||||
expect(filenames.css(env)).toEqual('[name].[contenthash:7].css')
|
||||
expect(filenames.css(env)).toEqual('css/[contenthash:7].css')
|
||||
expect(filenames.img(env)).toEqual('img/[name].[contenthash:7].[ext]')
|
||||
expect(filenames.font(env)).toEqual('fonts/[name].[contenthash:7].[ext]')
|
||||
expect(filenames.video(env)).toEqual('videos/[name].[contenthash:7].[ext]')
|
||||
|
Loading…
Reference in New Issue
Block a user