Skip to content

Legacy JS doesn't work after build #5

@thaoms

Description

@thaoms

When using this (for testing purposes):

{{ craft.twigpack.includeSafariNomoduleFix() }}
{{ craft.twigpack.includeJsModule("app.js", false) }}

JS doesn't work anymore, simply doesn't get executed and no errors.

I couldn't really find the issue, but it seems that the optimizer is misconfigured and the chunks are wrong.

styles: {
  name: settings.vars.cssName,
  test: /\.(pcss|css|vue)$/,
  chunks: 'all',
  enforce: true
}

When removing this block vue works fine but the chunks are wrong of course. Seems that putting al styles in one chunk is breaking js/vue.

When using the module version everything is fine.

Sorry for the bad description, but I'm still learning webpack.

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