Skip to content

webpack dynamic import naming doesn't work #730

Closed
@MarvinXu

Description

@MarvinXu

I used comment to define chunkname as follows:

import(/* webpackChunkName: "chunk1" */'../components/chunk1.js')

then change webpack config output.chunkFilename: utils.assetsPath('js/[name].js')

but the build result has no file named chunk1.js.

At first I thought it's a webpack bug. so I post an issue on webpack:
webpack/webpack#4861

But then I made a simple project without vuejs-template , chunkname works fine.

So I think there must be something wrong in the config of this template, could you help me find out ?

My test project:
https://github.com/MarvinXu/webpack-chunkname-test

many thx!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions