Open alkorlos opened 4 months ago
Hello! Thank you for functional library!
Describe the bug Need to use babel, the example from the documentation is not working, and I can't figure out why.
Testing on @babel/plugin-transform-unicode-sets-regex src\App.svelte:
src\App.svelte
<script> <!-- ... --> const re = new RegExp("/[\p{ASCII}&&\p{Decimal_Number}]/v") console.log(re) </script>
In the dist\assets\index-name.js expecting
dist\assets\index-name.js
/[0-9]/u
But there is no transpilation happening.
Logs No Logs with error.
To Reproduce svelte-preprocess-issue-babel
Doing this: npm create vite@latest, options: Svelte, JavaScript npm install svelte-preprocess @babel/core @babel/preset-env --save Update svelte.config.js:
npm create vite@latest
npm install svelte-preprocess @babel/core @babel/preset-env --save
svelte.config.js
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte' import preprocess from 'svelte-preprocess' export default { preprocess: [ vitePreprocess(), preprocess({ babel: { presets: [ [ '@babel/preset-env', { loose: true, modules: false, targets: { esmodules: true, }, }, ], ], }, }) ], }
That's all.
Did I miss a step in the documentation?
Expected behavior Expected transpilation JS.
Stacktraces No Stacktraces.
Information about your project:
Your browser and the version: Chrome 121
Your operating system: Windows 10 10.0.19045
svelte-preprocess version 5.1.3
svelte-preprocess
Whether your project uses: Vite and Rollup
Additional context No Additional context.
Hello! Thank you for functional library!
Describe the bug Need to use babel, the example from the documentation is not working, and I can't figure out why.
Testing on @babel/plugin-transform-unicode-sets-regex
src\App.svelte
:In the
dist\assets\index-name.js
expectingBut there is no transpilation happening.
Logs No Logs with error.
To Reproduce svelte-preprocess-issue-babel
Doing this:
npm create vite@latest
, options: Svelte, JavaScriptnpm install svelte-preprocess @babel/core @babel/preset-env --save
Updatesvelte.config.js
:That's all.
Did I miss a step in the documentation?
Expected behavior Expected transpilation JS.
Stacktraces No Stacktraces.
Information about your project:
Your browser and the version: Chrome 121
Your operating system: Windows 10 10.0.19045
svelte-preprocess
version 5.1.3Whether your project uses: Vite and Rollup
Additional context No Additional context.