GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — feat(create-webpack-app): stop asking about HTML and CSS by alexander-akait · Pull Request #4836 · webpack/webpack-cli Conversation
Member
Summary #4833 moved the Generating and building each template also surfaced three defects that predate both PRs and are fixed here: What kind of change does this PR introduce? feat Did you add tests for your changes? Yes — Does this PR introduce a breaking change? No for generated projects. The prompts change, so the If relevant, what needs to be documented once your changes are merged or what have you already documented? Documented in this PR: Use of AI Yes. Claude Code made the template and generator edits and ran the verification described above — generating every template, building it, and loading the result in a browser. I reviewed the diff and the verification output before submitting. Generated by Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionswebpack handles both out of the box, so the templates no longer ask whether to simplify HTML creation, which CSS solution to use, whether PostCSS is wanted or whether CSS should be extracted. `index.html` is always the entry point, a stylesheet is always scaffolded, and one question remains for the preprocessors webpack does not cover, wired through a `type: "css/auto"` rule that adds only sass-loader/less-loader/stylus-loader. Also fixes what the generated projects needed to build and run: `baseUrl` for the Vue TypeScript `paths`, a fully specified `./router/index.js` import under `"type": "module"`, Svelte 5's `mount()` instead of `new App()`, and style-module declarations for the TypeScript templates.
|
There was an error while loading. Please reload this page.
🦋 Changeset detectedLatest commit: 9496d56 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
This PR is packaged and the instant preview is available (11be634). Install it locally:
npm i -D create-webpack-app@https://pkg.pr.new/create-webpack-app@11be634 webpack-cli@https://pkg.pr.new/webpack-cli@11be634
yarn add -D create-webpack-app@https://pkg.pr.new/create-webpack-app@11be634 webpack-cli@https://pkg.pr.new/webpack-cli@11be634
pnpm add -D create-webpack-app@https://pkg.pr.new/create-webpack-app@11be634 webpack-cli@https://pkg.pr.new/webpack-cli@11be634 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@ ## main #4836 +/- ## ========================================== + Coverage 93.37% 94.78% +1.40% ========================================== Files 14 14 Lines 5407 5406 -1 Branches 790 799 +9 ========================================== + Hits 5049 5124 +75 + Misses 356 281 -75 + Partials 2 1 -1
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ssor The single CSS question now lists every tool webpack does not cover itself: PostCSS, Sass, Less, Stylus, and each preprocessor combined with PostCSS. A preprocessor rule then reads `use: ["postcss-loader", "sass-loader"]`, which webpack applies right to left, so the stylesheet is compiled first and PostCSS runs over the result. PostCSS also scaffolds `postcss.config.js` — in every template now, not just the default one — and asks for `experiments.css`, since its `.css` rule turns the automatic detection off. Covers the answer handling with a test that builds each generator's action list without running it, so all four templates and all eight answers are exercised in a second instead of an install apiece.
The default template no longer installs ts-loader or registers a rule for it: webpack strips the types itself. `typescript` stays for the editor and for the `check:types` script (`tsc --noEmit`, since the build type checks nothing), `tsconfig.json` gains `noEmit`, and `package.json` records the Node.js floor type stripping needs. This also gets the template off ts-loader 9, which crashes on TypeScript 7. The React, Vue and Svelte templates keep ts-loader: stripping handles neither `.tsx` nor the single-file components those loaders produce.
Type stripping is erasable syntax only and checks nothing, so a project that wants type checking, decorators, enums or `.tsx` still needs a loader. The default template asks which to use and defaults to webpack's built-in support; `ts-loader` restores the rule and the dependency. Every template that installs ts-loader now pins `typescript@5` with it: its latest release declares `typescript: "*"` but throws `Cannot read properties of undefined (reading 'fileExists')` on TypeScript 7. `tsconfig.json` also loses `noEmit`, which stopped ts-loader from emitting anything; `check:types` passes the flag itself.
"built-in" and "ts-loader" named the mechanism but not the trade-off, so the prompt now spells it out: webpack strips types with no type checking and needs Node.js >= 22.6, while ts-loader type checks as it builds and handles `.tsx`, enums and decorators. The stored answers are unchanged.
…ript@5 6.0.3 is the last release of the JavaScript line, and ts-loader 9 builds and type checks against it; only TypeScript 7, the native port, breaks it. Pinning the newest version that works keeps the scaffold current.
`baseUrl` is deprecated in TypeScript 6, so every module in the Vue TypeScript project failed with TS5101 once the pin moved to 6. A `paths` mapping needs no `baseUrl` when it is relative, which is also what fixed the TS5090 the option was added for.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.