Skip to content
This repository has been archived by the owner on Mar 17, 2021. It is now read-only.

[v0.6.0] ValidationError using limit as {String} #95

Closed
huineng opened this issue Oct 4, 2017 · 6 comments
Closed

[v0.6.0] ValidationError using limit as {String} #95

huineng opened this issue Oct 4, 2017 · 6 comments

Comments

@huineng
Copy link

huineng commented Oct 4, 2017

with the current release > 0.6.0 you published a day ago
i'm now getting build errors with webpack and angular
webpack 3.6
angular 4.4.4

Module build failed: Validation Error
URL Loader Invalid Options
options['name'] should NOT have additional properties
options.limit should be number

@alexander-akait
Copy link
Member

@huineng please update to 0.6.1, thank you!

@JounQin
Copy link

JounQin commented Oct 4, 2017

@evilebottnawi It still breaks on string query like url-loader?limit=10000

@damonbauer
Copy link

@evilebottnawi Seeing the same errors on 0.6.1:

{
  test: /experiments\/.*\/assets\/.*\.(png|jpg|svg)$/,
  use: ['url-loader?limit=8192']
}

Results in:

Module build failed: ModuleBuildError: Module build failed: Validation Error
URL Loader Invalid Options
options.limit should be number

@huineng
Copy link
Author

huineng commented Oct 4, 2017

yes that's what i meant with > 0.6.0 (also 0.6.1)

Now i changed from

 {
        test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
        loader: 'url-loader?limit=10000&name=public/fonts/[name].[ext]&mimetype=application/font-woff'
      },

to

{
                test: /\.woff(\?v=\d+\.\d+\.\d+)?$/,
                use: [
                    {
                        loader: 'url-loader',
                        options: {
                            limit: 10000,
                            name: 'public/fonts/[name].[ext]',
                            mimetype: 'application/font-woff'
                        }
                    }
                ]
            },

and this works

@alexander-akait
Copy link
Member

@damonbauer seems ['url-loader?limit=8192'] limit interpreted as string

@alexander-akait
Copy link
Member

PR: #96

@michael-ciniawsky michael-ciniawsky changed the title build error using => 0.6.0 [v0.6.0] ValidationError using limit as {String} Oct 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants