49 lines
882 B
JavaScript
49 lines
882 B
JavaScript
const path = require ('path');
|
|
|
|
module.exports = {
|
|
entry: './index.js',
|
|
output: {
|
|
filename: 'bundle.js',
|
|
path: path.resolve (__dirname, 'dist')
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /.(ttf|otf|eot|svg|woff(2)?)(\?[a-z0-9]+)?$/,
|
|
use: [{
|
|
loader: 'file-loader',
|
|
options: {
|
|
name: '[name].[ext]',
|
|
outputPath: 'fonts/', // where the fonts will go
|
|
publicPath: '/dist/fonts' // override the default path
|
|
}
|
|
}]
|
|
},
|
|
{
|
|
test: /\.(scss)$/,
|
|
use: [
|
|
{
|
|
loader: 'style-loader'
|
|
},
|
|
{
|
|
loader: 'css-loader'
|
|
},
|
|
{
|
|
// Loader for webpack to process CSS with PostCSS
|
|
loader: 'postcss-loader',
|
|
options: {
|
|
plugins: function () {
|
|
return [
|
|
require ('autoprefixer')
|
|
];
|
|
}
|
|
}
|
|
},
|
|
{
|
|
loader: 'sass-loader'
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}; |