Skip to content

Generated js files have SyntaxError when enabling source map in webpack config #1367

Closed
@jjyyxx

Description

@jjyyxx
  • I confirm that this is a issue rather than a question.

Bug report

When enabling source map in the configureWebpack option, the generated js files have SyntaxErrors. Comment the devtool: "source-map" line solves the problem.

Version

1.0.0-alpha.40

Steps to reproduce

git clone https://github.com/jjyyxx/vuepress-1367-repro.git
cd vuepress-1367-repro
npm run build

What is expected?

Generate valid code.

What is actually happening?

Uncaught SyntaxError: Unexpected token } happens in app.xxx.js.

Other relevant information

  • Your OS: Windows 10 1809
  • Node.js version: v11.4.0
  • Browser version: Google Chrome v72.0.3626.119
  • Is this a global or local install? local
  • Which package manager did you use for the install? npm
  • Does this issue occur when all plugins are disabled? yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    has PRHas a related PRtype: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions