Migration is looking for a "webpack" subfolder? #108
Replies: 2 comments 4 replies
-
follow up: It seems like several configuration setting in Webpack aren't ported to Vite equivalents like sourcemap, emptyOutDir and others (need to dig into it). |
Beta Was this translation helpful? Give feedback.
-
Hi @WebMechanic , thanks for your feedback
Please make sure your config file is named correctly because our strategy of parsing webpack config file is webpack-to-vite/src/config/parse.ts Lines 13 to 19 in e052115
We don't need to do that, because Vite will treat
Basically, the webpack entry point will automatic parsing and add to
Get your point, I appreciate the idea you proposed, and I also want to make it more convenient for users but currently, I don't have much time, so if you like please feel free to open a new PR (for example, list the configuration need to be ported to Vite in |
Beta Was this translation helpful? Give feedback.
-
Hello and thank you for this project,
I "inherited" some PHP Symfony projects that make use of their Webpack Wrapper Encore. Encore also uses webpack.config.js but adds loads of its own funktions to it.
We move to Vue 3 and I want to ditch Webpack (which I don't care to learn and bother with) in favour of using ESM with Vite and Rollup and their ecosystem.
I managed to get the final Webpack runtime configuration object out of Encore which I then saved as a new
webpack.config.js
(with mode:development ) in a project copy, after making some path adjustments.This is the command line for migration:
webpack-to-vite -t webpack -e main.js -d D:\foo\bar
After copying files and starting the "AST Parsing" I saw a partially covered line (by the conversion table results)
Failed to parse webpack config from default file path: D:\foo\bar\webpack\webpack.dev.conf.js.
It took many failed runs to see this line only becuase at one point I resized the terminal window.
I'm surprised to see it looking for
webpack/webpack.dev.conf.js
despite there is a config file in the project root.I eventually copied my file to this location and some migration action happened.
However this
webpack/
folder also ended up invite.config.js
which let Vite bail with unavailable modules (that are installed):I removed that
webpack/
folder prefix and Vite is running.I get a buttload of other errors unrelated to the migration that I need to review.
Beta Was this translation helpful? Give feedback.
All reactions