You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.3 KiB
61 lines
1.3 KiB
const path = require('path')
|
|
const HtmlWebpackPlugin = require('html-webpack-plugin')
|
|
const { VueLoaderPlugin } = require('vue-loader')
|
|
|
|
module.exports = {
|
|
entry: './examples/main.js',
|
|
mode: 'development',
|
|
resolve: {
|
|
extensions: ['*', '.js', '.vue'],
|
|
alias: {
|
|
main: path.resolve(__dirname, '../src')
|
|
},
|
|
},
|
|
output: {
|
|
path: path.resolve(__dirname, '../dist/dev'),
|
|
publicPath: '/',
|
|
filename: 'v-distpicker.js'
|
|
},
|
|
devServer: {
|
|
contentBase: path.resolve(__dirname, '../dist/dev'),
|
|
compress: false,
|
|
port: 3001
|
|
},
|
|
plugins: [
|
|
new HtmlWebpackPlugin({
|
|
filename: path.resolve(__dirname, '../dist/dev/index.html'),
|
|
template: 'examples/index.html',
|
|
inject: true
|
|
}),
|
|
new VueLoaderPlugin()
|
|
],
|
|
module: {
|
|
rules: [{
|
|
test: /\.vue$/,
|
|
use: 'vue-loader'
|
|
}, {
|
|
test: /\.js$/,
|
|
use: ['babel-loader', 'eslint-loader'],
|
|
exclude: /node_modules/
|
|
}, {
|
|
test: /\.css$/,
|
|
use: 'css-loader',
|
|
},
|
|
// {
|
|
// test: /\.scss$/,
|
|
// use: ['vue-style-loader', 'css-loader', 'sass-loader']
|
|
// },
|
|
{
|
|
test: /\.(png|jpe?g|gif|svg)(\?.*)?$/,
|
|
exclude: /node_modules/,
|
|
use: [{
|
|
loader: 'url-loader',
|
|
query: {
|
|
name: '[path][name].[ext]?[hash:8]',
|
|
limit: 8192
|
|
}
|
|
}]
|
|
}]
|
|
}
|
|
}
|