Skip to content

Commit

Permalink
Merge pull request #2 from dranc/fix/clean-code
Browse files Browse the repository at this point in the history
Fix some path because site was not working
  • Loading branch information
dranc authored Jan 3, 2024
2 parents 3a43656 + 014abc2 commit 9ac6968
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
17 changes: 2 additions & 15 deletions config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

const SizePlugin = require('size-plugin');
const CopyWebpackPlugin = require('copy-webpack-plugin');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');

const PATHS = require('./paths');

Expand All @@ -25,12 +24,6 @@ const common = {
},
module: {
rules: [
// Help webpack in understanding CSS files imported in .js files
{
test: /\.css$/,
use: [MiniCssExtractPlugin.loader, 'css-loader'],
},
// Check for images imported in .js files and
{
test: /\.(png|jpe?g|gif)$/i,
use: [
Expand All @@ -51,16 +44,10 @@ const common = {
// Copy static assets from `public` folder to `build` folder
new CopyWebpackPlugin({
patterns: [
{
from: '**/*',
context: 'src/asset',
},
{ from: 'html', to: '', context: 'src/asset' },
{ from: 'icons/*', context: 'src/asset' },
]
}),
// Extract CSS into separate files
new MiniCssExtractPlugin({
filename: '[name].css',
}),
],
};

Expand Down
6 changes: 3 additions & 3 deletions src/asset/html/index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<html>
<head>
<link rel="stylesheet" href="../style/index.min.css" />
<link rel="stylesheet" href="style/index.min.css" />
</head>
<body>
<nav class="demo imponent">
<a href="" class="brand">
<img class="logo" src="../icons/icon_128.png" />
<img class="logo" src="icons/icon_128.png" />
<span>Filigrane</span>
</a>
</nav>
Expand All @@ -32,6 +32,6 @@
</div>
</div>

<script src="../index.js"></script>
<script src="index.js"></script>
</body>
</html>

0 comments on commit 9ac6968

Please sign in to comment.