61 lines
1.4 KiB
JavaScript
61 lines
1.4 KiB
JavaScript
const webpack = require("webpack");
|
|
const path = require("path");
|
|
|
|
let config = {
|
|
mode: 'development',
|
|
entry: [
|
|
"./src/assets/js/quartiers_de_demain.js",
|
|
"./src/assets/js/animated_logo.js",
|
|
"./src/assets/scss/quartiers_de_demain.scss",
|
|
// "./src/assets/fonts/*",
|
|
// "./src/assets/css/animated_logo.css",
|
|
|
|
],
|
|
|
|
output: {
|
|
path: path.resolve(__dirname, "./dist/assets"),
|
|
filename: "./bundle.js"
|
|
},
|
|
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.scss$/i,
|
|
use: [
|
|
{
|
|
loader: 'file-loader',
|
|
options: {
|
|
name: './css/bundle.css',
|
|
}
|
|
},
|
|
// Compile le Sass en CSS
|
|
"sass-loader"
|
|
],
|
|
},
|
|
{
|
|
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/'
|
|
}
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
],
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module.exports = config; |