Skip to content

Commit

Permalink
try to clean webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
dranc committed Jan 3, 2024
1 parent 2363e0b commit 2a8fb8f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
14 changes: 11 additions & 3 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,29 @@ const config = merge(common, {
contentScript: PATHS.src + '/contentScript.ts',
background: PATHS.src + '/background.ts',
index: PATHS.src + '/index.ts',
style: PATHS.src + '/asset/style/index.scss'
},
resolve: {
extensions: ['.tsx', '.ts', '.js'],
},
module: {
rules: [
{
{
test: /\.tsx?$/,
loader: 'ts-loader',
exclude: /node_modules/,
},
{
test: /\.s[ac]ss$/i,
use: ['style-loader', 'css-loader', 'sass-loader'],
},
exclude: /node_modules/,
use: [
{
loader: 'file-loader',
options: { outputPath: 'style/', name: '[name].min.css'}
},
'sass-loader'
]
}
],
},
});
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="index.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>
2 changes: 1 addition & 1 deletion src/asset/style/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import url('~picnic/picnic.min.css');
@import '~picnic/src/picnic';

$height: 500px;
$width: 350px;
Expand Down
2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import './asset/style/index.scss';

import { saveAs } from 'file-saver';

import { FiligraneServices } from './services/filigrane.services';
Expand Down

0 comments on commit 2a8fb8f

Please sign in to comment.