2019-06-03 03:31:38 +00:00
|
|
|
import path from 'path';
|
|
|
|
import VueLoaderPlugin from 'vue-loader/lib/plugin';
|
|
|
|
import MiniCssExtractPlugin from 'mini-css-extract-plugin';
|
|
|
|
import autoprefixer from 'autoprefixer';
|
|
|
|
|
|
|
|
export default {
|
2020-05-14 02:26:05 +00:00
|
|
|
entry: './assets/js/main.js',
|
|
|
|
output: {
|
|
|
|
filename: 'bundle.js',
|
|
|
|
path: path.join(__dirname, 'public/js'),
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
rules: [
|
|
|
|
{
|
|
|
|
test: /\.vue$/,
|
|
|
|
include: [
|
|
|
|
path.resolve(__dirname, 'assets'),
|
|
|
|
],
|
|
|
|
loader: 'vue-loader',
|
|
|
|
options: {
|
|
|
|
preserveWhitespace: false,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.js$/,
|
|
|
|
exclude: /node_modules/,
|
|
|
|
use: [
|
|
|
|
{
|
|
|
|
loader: 'babel-loader',
|
|
|
|
options: {
|
|
|
|
babelrc: false,
|
|
|
|
plugins: [
|
|
|
|
'@babel/plugin-proposal-object-rest-spread',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'eslint-loader',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.scss$/,
|
|
|
|
use: [
|
|
|
|
MiniCssExtractPlugin.loader,
|
|
|
|
'css-loader?sourceMap',
|
|
|
|
{
|
|
|
|
loader: 'postcss-loader',
|
|
|
|
options: {
|
|
|
|
plugins: [autoprefixer],
|
|
|
|
sourceMap: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'sass-loader?sourceMap',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.svg/,
|
|
|
|
use: 'raw-loader',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new VueLoaderPlugin(),
|
|
|
|
new MiniCssExtractPlugin({
|
|
|
|
filename: '../css/style.css',
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
resolve: {
|
|
|
|
alias: {
|
|
|
|
theme: path.join(__dirname, 'assets/css/_theme.scss'),
|
2020-07-05 02:40:57 +00:00
|
|
|
breakpoints: path.join(__dirname, 'assets/css/_breakpoints.scss'),
|
2020-05-14 02:26:05 +00:00
|
|
|
config: path.join(__dirname, `assets/js/config/${process.env.NODE_ENV || 'default'}.js`),
|
|
|
|
},
|
|
|
|
},
|
2019-06-03 03:31:38 +00:00
|
|
|
};
|