chore: migrate build system from webpack 4 to Vite 6#158
Draft
chore: migrate build system from webpack 4 to Vite 6#158
Conversation
Agent-Logs-Url: https://github.com/blockpy-edu/blockpy/sessions/0356a7c4-2ef9-413c-8901-981cdf251386 Co-authored-by: acbart <897227+acbart@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
acbart
April 7, 2026 05:47
View session
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the webpack 4 build pipeline (requiring
NODE_OPTIONS="--openssl-legacy-provider"on Node 17+) with Vite 6.4.2, which works natively with modern Node.js and produces faster builds.Key changes
vite.config.mjs— new Vite config in UMD library mode:resolve-srcplugin replicates webpack'sresolve.modules: ['./src'], preserving bare imports likeimport { ... } from "storage.js"jquery→jQuery,knockout→ko,filepond→FilePond) carried over unchangedBUILD_MIN=trueenv var toggles minification and selects output filename (blockpy.jsvsblockpy.min.js)dist/blockpy.css; inline source maps retainedpackage.json:build:vite build --config vite.config.mjs && cross-env BUILD_MIN=true vite build --config vite.config.mjsdev:vite build --watch --config vite.config.mjswebpack,webpack-cli,babel-loader,eslint-loader,css-loader,mini-css-extract-plugin,@babel/core,@babel/preset-env,yargs,pathvite@6.4.2,cross-env@10.1.0(cross-platform env var syntax)Removed:
webpack.config.js,.babelrcOutput (unchanged structure)
dist/blockpy.jsdist/blockpy.min.jsdist/blockpy.css