Closed SophieAu closed 3 years ago
Hi @SophieAu - Thanks for raising this. Looks like something has changed upstream. Will investigate today 👍
Yeah, looks like I've found the issue. It's in svelte. The has_prop
method gets compiled to something that's invalid.
I've looked into it some more and it looks like the issue gets triggered when the spec
option is set in the babel plugin in the rollup config (https://github.com/wailsapp/wails/blob/master/cmd/templates/svelte/frontend/rollup.config.js#L83).
...
'@babel/preset-env',
{
targets: '> 0.25%, not dead, IE 11',
modules: false,
spec: true,
useBuiltIns: 'usage',
forceAllTransforms: true,
corejs: 3,
},
...
If you set the value to false
or delete it the build seems to run just fine.
Is there a specific reason that line has to be in there? From the docs it seems not too important (https://babeljs.io/docs/en/babel-preset-env#spec) but this is the first time I've ever played around with babel so some input from someone with more experience would probably be a good idea.
You rock! Great sleuthing. If you have time, it would be great to get a PR for this. The templates are in cmd
. If not, i'll try and dind time tomorrow. We PR against develop. Cheers!
This should be fixed with PR #593
@SophieAu - The latest pre-release has this fix. Please install using wails update -pre
. Thanks again! 👍
Description
When trying to initialize a new project using the Svelte template, the frontend build fails with what looks like a bundler error.
To Reproduce Steps to reproduce the behaviour:
wails init
selecting Svelte (3) as the frontend templateSystem Details
Additional context This is the error message: