Skip to content

Commit

Permalink
feat: change to one warning
Browse files Browse the repository at this point in the history
  • Loading branch information
manniL committed Nov 9, 2018
1 parent 2ff4d71 commit b271f74
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 4 additions & 2 deletions packages/webpack/src/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ export class WebpackBundler {
// Check styleResource existence
const styleResources = this.context.options.build.styleResources
if (styleResources && Object.keys(styleResources).length) {
consola.warn('Using styleResources without the nuxt-style-resources-module is not suggested and can lead to severe performance issues')
consola.warn('Please use https://github.com/nuxt-community/style-resources-module')
consola.warn(
'Using styleResources without the nuxt-style-resources-module is not suggested and can lead to severe performance issues.',
'Please use https://github.com/nuxt-community/style-resources-module'
)
}
Object.keys(styleResources).forEach(async (ext) => {
await Promise.all(wrapArray(styleResources[ext]).map(async (p) => {
Expand Down
6 changes: 2 additions & 4 deletions test/fixtures/with-config/with-config.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@ const hooks = [

describe('with-config', () => {
buildFixture('with-config', () => {
expect(consola.warn).toHaveBeenCalledTimes(4)
expect(consola.warn).toHaveBeenCalledTimes(3)
expect(consola.fatal).toHaveBeenCalledTimes(0)
expect(consola.warn.mock.calls).toMatchObject([
[{
message: 'Found 2 plugins that match the configuration, suggest to specify extension:',
additional: expect.stringContaining('plugins/test.json')
}],
[
'Using styleResources without the nuxt-style-resources-module is not suggested and can lead to severe performance issues'
],
[
'Using styleResources without the nuxt-style-resources-module is not suggested and can lead to severe performance issues.',
'Please use https://github.com/nuxt-community/style-resources-module'
],
[
Expand Down

0 comments on commit b271f74

Please sign in to comment.