Skip to content

Commit

Permalink
s
Browse files Browse the repository at this point in the history
  • Loading branch information
SavageCore committed Sep 20, 2023
1 parent d2aa1c8 commit 7cd623a
Showing 1 changed file with 84 additions and 84 deletions.
168 changes: 84 additions & 84 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,88 +13,88 @@ const HtmlWebpackInlineSourcePlugin = require('html-webpack-inline-source-plugin
const isInline = process.env.inline;

module.exports = {
entry: {
bundle: ['./src/main.js']
},
resolve: {
alias: {
svelte: path.resolve('node_modules', 'svelte'),
'@Components': path.resolve(__dirname, 'src/Components/'),
'@Services': path.resolve(__dirname, 'src/Services/'),
'@Assets': path.resolve(__dirname, 'src/Assets/'),
},
extensions: ['.mjs', '.js', '.svelte'],
mainFields: ['svelte', 'browser', 'module', 'main']
},
output: {
path: __dirname + '/public',
filename: '[name].js',
chunkFilename: '[name].[id].js'
},
module: {
rules: [
{
test: /\.(js|mjs|svelte)$/,
exclude: /node_modules\/(?!svelte)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ['@babel/plugin-proposal-object-rest-spread']
}
},
},
{
test: /\.svelte$/,
exclude: /node_modules/,
use: {
loader: 'svelte-loader',
options: {
emitCss: true,
hotReload: true,
preprocess: require('svelte-preprocess')([
scss()
])
}
}
},
{
test: /\.css$/,
use: [
/**
* MiniCssExtractPlugin doesn't support HMR.
* For developing, use 'style-loader' instead.
* */
prod ? MiniCssExtractPlugin.loader : 'style-loader',
'css-loader',
"postcss-loader"
]
},
{
test: /\.(png|jpe?g|gif|mp4|svg|ttf)$/,
use: [
{
loader: 'file-loader'
},
],
},
]
},
mode,
plugins: [
new MiniCssExtractPlugin({
filename: '[name].css'
}),
new HtmlWebpackPlugin({
inlineSource: isInline ? '.(js|css)$' : '',
hash: isInline ? false : true,
template: './src/index.html',
title: 'svelte-boilerplate'
}),
new HtmlWebpackInlineSourcePlugin()
],
devtool: prod ? false : 'source-map',
devServer: {
port: 3000
}
entry: {
bundle: ['./src/main.js']
},
resolve: {
alias: {
svelte: path.resolve('node_modules', 'svelte'),
'@Components': path.resolve(__dirname, 'src/Components/'),
'@Services': path.resolve(__dirname, 'src/Services/'),
'@Assets': path.resolve(__dirname, 'src/Assets/'),
},
extensions: ['.mjs', '.js', '.svelte'],
mainFields: ['svelte', 'browser', 'module', 'main']
},
output: {
path: __dirname + '/public',
filename: '[name].js',
chunkFilename: '[name].[id].js'
},
module: {
rules: [
{
test: /\.(js|mjs|svelte)$/,
exclude: /node_modules\/(?!svelte)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ['@babel/plugin-proposal-object-rest-spread']
}
},
},
{
test: /\.svelte$/,
exclude: /node_modules/,
use: {
loader: 'svelte-loader',
options: {
emitCss: true,
hotReload: true,
preprocess: require('svelte-preprocess')([
scss()
])
}
}
},
{
test: /\.css$/,
use: [
/**
* MiniCssExtractPlugin doesn't support HMR.
* For developing, use 'style-loader' instead.
* */
prod ? MiniCssExtractPlugin.loader : 'style-loader',
'css-loader',
"postcss-loader"
]
},
{
test: /\.(png|jpe?g|gif|mp4|svg|ttf)$/,
use: [
{
loader: 'file-loader'
},
],
},
]
},
mode,
plugins: [
new MiniCssExtractPlugin({
filename: '[name].css'
}),
new HtmlWebpackPlugin({
inlineSource: isInline ? '.(js|css)$' : '',
hash: isInline ? false : true,
template: './src/index.html',
title: 'PD3 Vault Cracker'
}),
new HtmlWebpackInlineSourcePlugin()
],
devtool: prod ? false : 'source-map',
devServer: {
port: 3000
}
};

0 comments on commit 7cd623a

Please sign in to comment.