Skip to content
Snippets Groups Projects
Commit 3a321c2b authored by plup's avatar plup
Browse files

feature: imported webpack template

parent 401a000e
No related branches found
No related tags found
1 merge request!74Deploy sibapp with managers
File moved
File moved
File moved
File moved
const path = require('path');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const config = {
entry: {
app: './src/scripts/index.js'
},
output: {
path: path.resolve(__dirname, 'dist'),
filename: "[name].bundle.js",
},
plugins: [
new HtmlWebpackPlugin({
template: './src/index.pug'
}),
new MiniCssExtractPlugin({
filename: "style.css"
})
],
module: {
rules: [
{
test: /\.pug$/,
use: "pug-loader"
},
{
test: /\.js$/,
exclude: /node_modules/,
use: "babel-loader"
},
{
test: /\.scss$/,
use: [
MiniCssExtractPlugin.loader,
{ loader: 'css-loader', options: { url: false, sourceMap: true } },
{ loader: 'sass-loader', options: { sourceMap: true } }
]
},
{
test: /\.(gif|png|jpe?g|svg)$/i,
use: 'file-loader'
},
{
test: /\.(eot|ttf|woff|woff2)$/,
loader: 'file-loader',
}
]
}
};
module.exports = (env, argv) => {
if (argv.mode === 'development') {}
if (argv.mode === 'production') {}
return config;
}
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule \. - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment