Closed Toilal closed 2 years ago
using the dev version of vue3-sfc-loader
:
loc: {
file: '...vue2-sfc-loader.esm.js',
line: 76715,
column: 11
},
frame: "76713: process.title = 'browser';\n" +
'76714: process.browser = true;\n' +
'76715: process.env = {};\n' +
' ^\n' +
'76716: process.argv = [];\n' +
"76717: process.version = ''; // empty string to avoid regexp issues",
https://github.com/defunctzombie/node-process/blob/master/browser.js#L157
Maybe rollup tries to replace process.env
with another expression that is not suitable for assignment (eg. {} = {}
) ?
note that using process.env = {};
somewhere in the code compiled by vite is enough to rise this issue !
I tried to build from current master, and it seems it fixe the issue. Can you release a new version ?
version 0.8.0 has been released.
however, note that "generate TypeScript definition file as a bundle" feature has been temporary disabled because of https://github.com/FranckFreiburger/vue3-sfc-loader/pull/65#issuecomment-841708263
I tried to build from current master, and it seems it fixe the issue. Can you release a new version ?
Can I close this issue ?
Yes, it works now ! Thanks
Le dim. 11 juil. 2021 à 09:21, Franck Freiburger @.***> a écrit :
I tried to build from current master, and it seems it fixe the issue. Can you release a new version ?
Can I close this issue ?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/FranckFreiburger/vue3-sfc-loader/issues/67#issuecomment-877754197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAI4TPREMIQLLMDZ4F6R2UTTXFA53ANCNFSM44YKGS6A .
Describe the bug
I try to build an app using vue2-sfc-loader (esm) and vite.
It works properly in dev mode, but when building the app, it fails. Vite is building with rollup under the hood, so it may likely be a configuration issue, but I can't understand the following error.
To Reproduce
Expected behavior
Versions
Additional context