Skip to content

Cannot build svelte components in production #98

Open
@d3chapma

Description

@d3chapma

I am trying to use svelte for building components and a legacy Backbone application.

The application is currently built using webpack. I added:

      rules: [
        {
          test: /\.svelte$/,
          exclude: /node_modules/,
          use: 'svelte-loader',
        },
      ]

to my webpack.config and everything seems to work fine in development, but when I build for production I get the following error:

ERROR in vendor-53f438ed5305e5f2fa59.js from UglifyJs
Unexpected token: operator (>) [/Users/dc/Projects/web/d3m/node_modules/svelte/internal.js:6,0][vendor-53f438ed5305e5f2fa59.js:46867,20]

ERROR in main-83daa955f5b3660f5e3c.js from UglifyJs
Unexpected token: punc (() [main-83daa955f5b3660f5e3c.js:84246,3]

Any thoughts on what might cause something like this?

Update: I am using webpack 3.8.1

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