2019-02-15 11:10:07 +03:00
|
|
|
const path = require('path');
|
2019-02-20 20:40:02 +03:00
|
|
|
const { VueLoaderPlugin } = require('vue-loader');
|
2019-02-15 11:10:07 +03:00
|
|
|
|
|
|
|
module.exports = {
|
2019-02-20 20:40:02 +03:00
|
|
|
entry: {
|
|
|
|
'additionalScripts': path.join(__dirname, 'src', 'additionalScripts.js'),
|
|
|
|
'files_sharing': path.join(__dirname, 'src', 'files_sharing.js'),
|
2019-02-21 15:41:38 +03:00
|
|
|
},
|
2019-02-15 11:10:07 +03:00
|
|
|
output: {
|
2019-02-20 20:40:02 +03:00
|
|
|
path: path.resolve(__dirname, './js/dist/'),
|
2019-02-15 11:10:07 +03:00
|
|
|
publicPath: '/js/',
|
2019-02-20 20:40:02 +03:00
|
|
|
filename: '[name].js',
|
|
|
|
chunkFilename: 'files_sharing.[id].js'
|
|
|
|
|
2019-02-15 11:10:07 +03:00
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.css$/,
|
2019-02-20 20:40:02 +03:00
|
|
|
use: ['vue-style-loader', 'css-loader']
|
2019-02-15 11:10:07 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
2019-02-20 20:40:02 +03:00
|
|
|
use: ['vue-style-loader', 'css-loader', 'sass-loader']
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.vue$/,
|
|
|
|
loader: 'vue-loader'
|
2019-02-15 11:10:07 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
loader: 'babel-loader',
|
2019-02-20 20:40:02 +03:00
|
|
|
exclude: /node_modules/,
|
|
|
|
options: {
|
2019-02-24 17:31:35 +03:00
|
|
|
plugins: ['@babel/plugin-syntax-dynamic-import', 'transform-es2015-arrow-functions']
|
2019-02-20 20:40:02 +03:00
|
|
|
}
|
2019-02-15 11:10:07 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(png|jpg|gif|svg)$/,
|
|
|
|
loader: 'file-loader',
|
|
|
|
options: {
|
|
|
|
name: '[name].[ext]?[hash]'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2019-02-20 20:40:02 +03:00
|
|
|
plugins: [new VueLoaderPlugin()],
|
2019-02-15 11:10:07 +03:00
|
|
|
resolve: {
|
2019-02-20 20:40:02 +03:00
|
|
|
alias: {
|
|
|
|
vue$: 'vue/dist/vue.runtime.esm.js',
|
|
|
|
},
|
2019-02-21 15:41:38 +03:00
|
|
|
extensions: ['*', '.js', '.vue', '.json'],
|
|
|
|
modules: [
|
|
|
|
path.join(__dirname, '../../node_modules')
|
|
|
|
]
|
|
|
|
},
|
2019-02-15 11:10:07 +03:00
|
|
|
};
|