Use babel to support old browser versions up to firefox 52
This commit is contained in:
15
svelte/babel.config.cjs
Normal file
15
svelte/babel.config.cjs
Normal file
@@ -0,0 +1,15 @@
|
||||
module.exports = function (api) {
|
||||
api.cache(true);
|
||||
return {
|
||||
presets: [
|
||||
[
|
||||
"@babel/env",
|
||||
{
|
||||
"targets": {
|
||||
"firefox": "52"
|
||||
}
|
||||
}
|
||||
]
|
||||
]
|
||||
};
|
||||
}
|
2135
svelte/package-lock.json
generated
2135
svelte/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -8,6 +8,9 @@
|
||||
"start": "sirv public"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.22.20",
|
||||
"@babel/preset-env": "^7.22.20",
|
||||
"@rollup/plugin-babel": "^6.0.3",
|
||||
"@rollup/plugin-commonjs": "^25.0.0",
|
||||
"@rollup/plugin-node-resolve": "^15.2.1",
|
||||
"@rollup/plugin-terser": "^0.4.3",
|
||||
|
@@ -3,6 +3,7 @@ import resolve, { nodeResolve } from '@rollup/plugin-node-resolve';
|
||||
import commonjs from '@rollup/plugin-commonjs';
|
||||
import livereload from 'rollup-plugin-livereload';
|
||||
import terser from '@rollup/plugin-terser';
|
||||
import babel from '@rollup/plugin-babel'
|
||||
|
||||
const production = !process.env.ROLLUP_WATCH;
|
||||
|
||||
@@ -37,6 +38,11 @@ export default [
|
||||
emitCss: false,
|
||||
}),
|
||||
|
||||
babel({
|
||||
extensions: [".js", ".html", ".svelte"],
|
||||
babelHelpers: "bundled",
|
||||
}),
|
||||
|
||||
// If you have external dependencies installed from
|
||||
// npm, you'll most likely need these plugins. In
|
||||
// some cases you'll need additional configuration -
|
||||
|
Reference in New Issue
Block a user