Skip to content

Enhancement: Better defaults #442

Closed
Closed
@evenstensberg

Description

@evenstensberg

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Yes, setting good defaults.

Describe the solution you'd like
From @sokra :

I tried webpack-cli init and noticed a few things:

  • env preset should be used with {modules: false}
  • entry: 0 is generated
  • output.filename output.chunkFilename and output.path should be omitted when using the defaults
  • const path = require("path") is missing
  • mode: "production" already includes the uglifyjs plugin and it should not be added to the plugin (this would uglify twice)
  • plugins: ["syntax-dynamic-import"] should be added to support import()
  • module.rules.exclude should be module.rules.include: [path.resolve(__dirname, "src")] instead

Additional context
Most of these are trivial to add, entry: 0 is from the recursive parser part, need some tweaks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions