Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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,
}
}]
}
]
}
}
```