Skip to content

Can't use the --template flag with the default template #909

@givanse

Description

@givanse

Do you want to request a feature or report a bug?

bug

What is the current behaviour?

preact build --template src/index.html
✖ ERROR Template execution failed: TypeError: htmlWebpackPlugin.options.createLoadManifest is not a function
✖ ERROR   TypeError: htmlWebpackPlugin.options.createLoadManifest is not a function

If the current behaviour is a bug, please provide the steps to reproduce.

cp node_modules/preact-cli/lib/resources/template.html src/index.html
preact build --template src/index.html

What is the expected behaviour?

preact builds even when using the default template

If this is a feature request, what is motivation or use case for changing the behaviour?

Please mention other relevant information.

Please paste the results of preact info here.

./node_modules/.bin/preact info

Environment Info:

  System:
    OS: macOS Mojave 10.14.6
    CPU: (12) x64 Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz
  Binaries:
    Node: 8.16.1 - ~/.nvm/versions/node/v8.16.1/bin/node
    Yarn: 1.19.0 - ~/.nvm/versions/node/v8.16.1/bin/yarn
    npm: 6.4.1 - ~/.nvm/versions/node/v8.16.1/bin/npm
  Browsers:
    Chrome: 78.0.3904.70
    Firefox: 67.0.4
    Safari: 13.0.3
  npmPackages:
    preact: ^8.5.2 => 8.5.2 
    preact-cli: 3.0.0-rc.4 => 3.0.0-rc.4 
    preact-compat: ^3.17.0 => 3.19.0 
    preact-render-to-string: ^4.1.0 => 4.1.0 
    preact-router: ^2.5.7 => 2.6.1 
  npmGlobalPackages:
    preact-cli: 2.2.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