drupal-quartiersdedemain/web/themes/custom/quartiers_de_demain/webpack.config.js

74 lines
1.8 KiB
JavaScript
Raw Normal View History

2024-05-27 13:54:50 +02:00
const webpack = require("webpack");
const path = require("path");
let config = {
mode: 'development',
entry: [
"./src/assets/js/quartiers_de_demain.js",
2024-07-11 14:31:51 +02:00
// "./src/assets/js/animated_logo.js",
"./src/assets/js/animated_formes.js",
2024-05-27 13:54:50 +02:00
"./src/assets/scss/quartiers_de_demain.scss",
2024-06-03 15:26:40 +02:00
// "./src/assets/fonts/*",
2024-05-27 15:10:34 +02:00
// "./src/assets/css/animated_logo.css",
2024-05-27 13:54:50 +02:00
],
output: {
path: path.resolve(__dirname, "./dist/assets"),
filename: "./bundle.js"
},
module: {
rules: [
{
test: /\.scss$/i,
use: [
2024-07-15 13:04:02 +02:00
2024-05-27 13:54:50 +02:00
{
loader: 'file-loader',
options: {
name: './css/bundle.css',
}
},
// Compile le Sass en CSS
"sass-loader"
],
},
2024-06-03 15:26:40 +02:00
{
test: /\.(png|svg|jpg|jpeg|gif)$/i,
type: 'asset/resource',
},
{
test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
use: [
{
loader: 'file-loader',
options: {
name: '[name].[ext]',
outputPath: 'fonts/'
}
2024-07-15 13:04:02 +02:00
},
{
loader: 'postcss-loader',
options: {
sourceMap: true,
config: {
path: 'postcss.config.js'
}
}
},
2024-06-03 15:26:40 +02:00
]
2024-07-05 15:35:25 +02:00
},
2024-07-15 13:04:02 +02:00
2024-07-05 15:35:25 +02:00
2024-05-27 13:54:50 +02:00
],
2024-07-15 13:04:02 +02:00
2024-05-27 13:54:50 +02:00
}
}
module.exports = config;