Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is no chunk infos we can use in loaders. #72

Closed
Emiya0306 opened this issue Feb 26, 2017 · 1 comment
Closed

There is no chunk infos we can use in loaders. #72

Emiya0306 opened this issue Feb 26, 2017 · 1 comment

Comments

@Emiya0306
Copy link

I don't find any string template which let me get chunk name in loaders. In TemplatedPathPlugin, I can get the chunkName by "[name]", and file name by "[file]".

I expect let the templates the same as webpack's template. It will be more cool and easy to use.
Just like the config below.

{
  test: /\.png$|\.jpg$|\.gif$/,
  use: [
    {
      loader: 'url-loader',
      options: {
        name: '[name]/images/[file]-[hash].[ext]',
        limit: '5000'
      }
    }
  ]
}
@sokra
Copy link
Member

sokra commented Mar 7, 2017

No, and this is not possible. Chunks are created after loaders/modules.

@sokra sokra closed this as completed Mar 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants