Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yazonnile/svelte-webpack-babel
svelte + webpack + babel starter
https://github.com/yazonnile/svelte-webpack-babel
Last synced: 2 months ago
JSON representation
svelte + webpack + babel starter
- Host: GitHub
- URL: https://github.com/yazonnile/svelte-webpack-babel
- Owner: yazonnile
- Created: 2020-04-16T19:27:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T17:10:15.000Z (almost 2 years ago)
- Last Synced: 2024-10-09T16:31:43.318Z (3 months ago)
- Language: Svelte
- Homepage:
- Size: 1.84 MB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# svelte-webpack-babel
svelte + webpack + babel starter# ` babel.config.json`
````json
{
"presets": [
[
"@babel/env",
{
"useBuiltIns": "usage",
"corejs": 3,
"targets": {
"browsers": [
"> 0.5%",
"last 2 major versions",
"safari >= 9",
"ie >= 11",
"not dead"
]
}
}
]
]
}
````# `webpack.config.json` - module part
```js
{
module: {
rules: [
{
test: /\.m?js$/,
exclude: /node_modules\/(?!svelte)/,
use: ['babel-loader']
},
{
test: /\.svelte$/,
exclude: /node_modules\/(?!svelte)/,
use: ['babel-loader', {
loader: 'svelte-loader',
options: {
dev: !isProduction,
}
}]
}
]
}
}
```