Latest updates
This commit is contained in:
parent
aace75679a
commit
b2208a7e58
15 changed files with 1267 additions and 131 deletions
44
webpack.common.js
Normal file
44
webpack.common.js
Normal file
|
@ -0,0 +1,44 @@
|
|||
const path = require('path');
|
||||
const HtmlWebpackPlugin = require('html-webpack-plugin');
|
||||
const GoogleFontsPlugin = require('@beyonk/google-fonts-webpack-plugin');
|
||||
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
|
||||
const ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin');
|
||||
|
||||
module.exports = {
|
||||
entry: './src/index.js',
|
||||
plugins: [
|
||||
new CleanWebpackPlugin(),
|
||||
new HtmlWebpackPlugin({
|
||||
title: 'NCounter',
|
||||
}),
|
||||
new GoogleFontsPlugin({
|
||||
fonts: [
|
||||
{ family: "Material Icons" }
|
||||
],
|
||||
local: false
|
||||
}),
|
||||
new ServiceWorkerWebpackPlugin({
|
||||
entry: path.join(__dirname, 'src/sw.js'),
|
||||
})
|
||||
],
|
||||
output: {
|
||||
filename: 'index.js',
|
||||
path: path.resolve(__dirname, 'dist')
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.svelte$/,
|
||||
exclude: /node_modules/,
|
||||
loader: 'svelte-loader'
|
||||
},
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: [
|
||||
'style-loader',
|
||||
'css-loader'
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue