Skip to content

How to sort output chunks, font and other files in appropiate directories #6315

Closed
@benpoe

Description

@benpoe

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ *] feature request

Versions.

@angular/cli: 1.0.1
node: 7.7.2
os: win32 x64
@angular/animations: 4.1.0
@angular/common: 4.1.0
@angular/compiler: 4.1.0
@angular/core: 4.1.0
@angular/forms: 4.1.0
@angular/http: 4.1.0
@angular/platform-browser: 4.1.0
@angular/platform-browser-dynamic: 4.1.0
@angular/platform-server: 4.1.0
@angular/router: 4.1.0
@angular/cli: 1.0.1
@angular/compiler-cli: 4.1.0

Repro steps.

npm run build:prod:aot

The log given by the failure.

none

Desired functionality.

When doing a "npm run build" all js-chunks, bundles, fonts are thrown into the "dist"-directory.
Using webpack I'd have sorted them into appropiate directories. js in "js", fonts in "fonts" etc.


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

              {
                  test: /\.(ttf|eot|svg)(\?v=.+)?$/,
                  //use: 'file-loader'
                  loader: 'file-loader?name=**assets/fonts/**[name].[ext]'
              },
        output: {
            path: helpers.root('dist'),
            filename: '**js/**[name].[chunkhash].bundle.js',
            sourceMapFilename: '**js/**[name].[chunkhash].bundle.map',
            chunkFilename: '**js/**[id].[chunkhash].chunk.js'
        },

It'd be great if angular-cli would have an option to configure the output too.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions