2019-09-03 12:58:51 +03:00
|
|
|
const path = require('path')
|
|
|
|
const { VueLoaderPlugin } = require('vue-loader')
|
|
|
|
const StyleLintPlugin = require('stylelint-webpack-plugin')
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: path.join(__dirname, 'src', 'main.js'),
|
|
|
|
output: {
|
|
|
|
path: path.resolve(__dirname, './js'),
|
|
|
|
publicPath: '/js/',
|
|
|
|
filename: 'forms.js',
|
2020-03-23 15:25:12 +03:00
|
|
|
chunkFilename: 'chunks/[name].js',
|
2019-09-03 12:58:51 +03:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
2020-03-23 15:25:12 +03:00
|
|
|
use: ['vue-style-loader', 'css-loader'],
|
2019-09-03 12:58:51 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
2020-03-23 15:25:12 +03:00
|
|
|
use: ['vue-style-loader', 'css-loader', 'sass-loader'],
|
2019-09-03 12:58:51 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(js|vue)$/,
|
|
|
|
use: 'eslint-loader',
|
|
|
|
exclude: /node_modules/,
|
2020-03-23 15:25:12 +03:00
|
|
|
enforce: 'pre',
|
2019-09-03 12:58:51 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.vue$/,
|
|
|
|
loader: 'vue-loader',
|
2020-03-23 15:25:12 +03:00
|
|
|
exclude: /node_modules/,
|
2019-09-03 12:58:51 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
loader: 'babel-loader',
|
2020-03-23 15:25:12 +03:00
|
|
|
exclude: /node_modules/,
|
2019-09-03 12:58:51 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|jpg|gif|svg)$/,
|
2020-03-23 15:25:12 +03:00
|
|
|
loader: 'url-loader',
|
2019-09-03 12:58:51 +03:00
|
|
|
options: {
|
2020-03-23 15:25:12 +03:00
|
|
|
limit: 8192,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
],
|
2019-09-03 12:58:51 +03:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new VueLoaderPlugin(),
|
2020-03-23 15:25:12 +03:00
|
|
|
new StyleLintPlugin(),
|
2019-09-03 12:58:51 +03:00
|
|
|
],
|
|
|
|
resolve: {
|
2020-03-23 15:25:12 +03:00
|
|
|
extensions: ['*', '.js', '.vue'],
|
|
|
|
symlinks: false,
|
|
|
|
},
|
2019-09-03 12:58:51 +03:00
|
|
|
}
|