mirror of
https://github.com/Luzifer/password.git
synced 2024-11-13 19:52:43 +00:00
47 lines
983 B
JavaScript
47 lines
983 B
JavaScript
const path = require('path')
|
|
const webpack = require('webpack')
|
|
|
|
module.exports = {
|
|
entry: './src/index.js',
|
|
|
|
output: {
|
|
filename: 'bundle.js',
|
|
path: path.resolve(__dirname, '../frontend/assets'),
|
|
publicPath: "assets/"
|
|
},
|
|
|
|
module: {
|
|
rules: [{
|
|
test: /\.m?js$/,
|
|
exclude: /(node_modules|bower_components)/,
|
|
use: {
|
|
loader: 'babel-loader',
|
|
options: {
|
|
presets: ['@babel/preset-env']
|
|
}
|
|
}
|
|
},
|
|
{
|
|
test: /\.s?css$/,
|
|
use: [
|
|
"style-loader", // creates style nodes from JS strings
|
|
"css-loader", // translates CSS into CommonJS
|
|
"sass-loader" // compiles Sass to CSS, using Node Sass by default
|
|
]
|
|
},
|
|
{
|
|
test: /\.(woff|woff2|eot|ttf|otf|svg)$/,
|
|
use: [
|
|
'file-loader'
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
plugins: [
|
|
new webpack.ProvidePlugin({
|
|
'jQuery': 'jquery',
|
|
'$': 'jquery',
|
|
})
|
|
]
|
|
}
|