2019-09-13 19:28:44 +03:00
|
|
|
const path = require('path')
|
|
|
|
const { VueLoaderPlugin } = require('vue-loader')
|
|
|
|
const StyleLintPlugin = require('stylelint-webpack-plugin')
|
|
|
|
|
|
|
|
module.exports = {
|
2019-10-18 12:33:38 +03:00
|
|
|
entry: {
|
|
|
|
'admin/allowed-groups': path.join(__dirname, 'src', 'AllowedGroupsSettings.js'),
|
2019-10-18 12:58:15 +03:00
|
|
|
"admin/commands": path.join(__dirname, 'src', 'CommandsSettings.js'),
|
2019-10-18 12:33:38 +03:00
|
|
|
'talk': path.join(__dirname, 'src', 'main.js')
|
|
|
|
},
|
2019-09-13 19:28:44 +03:00
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, './js'),
|
|
|
|
publicPath: '/js/',
|
2019-10-18 12:33:38 +03:00
|
|
|
filename: '[name].js'
|
2019-09-13 19:28:44 +03:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
|
|
|
use: ['vue-style-loader', 'css-loader']
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: ['vue-style-loader', 'css-loader', 'sass-loader']
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(js|vue)$/,
|
|
|
|
use: 'eslint-loader',
|
|
|
|
exclude: /node_modules/,
|
|
|
|
enforce: 'pre'
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.vue$/,
|
|
|
|
loader: 'vue-loader',
|
|
|
|
exclude: /node_modules/
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
loader: 'babel-loader',
|
|
|
|
exclude: /node_modules/
|
2019-10-18 12:33:38 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|jpg|gif|svg)$/,
|
|
|
|
loader: 'file-loader',
|
|
|
|
options: {
|
|
|
|
name: '[name].[ext]?[hash]'
|
|
|
|
}
|
2019-09-13 19:28:44 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new VueLoaderPlugin(),
|
|
|
|
new StyleLintPlugin()
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
extensions: ['*', '.js', '.vue']
|
|
|
|
}
|
|
|
|
}
|