41 lines
868 B
JavaScript
41 lines
868 B
JavaScript
|
|
const { dirname } = require("path");
|
|
const VueLoaderPlugin = require("vue-loader/lib/plugin");
|
|
|
|
module.exports = {
|
|
entry: {
|
|
"archive-list": "./src/loaders/archiveListLoader.js",
|
|
},
|
|
optimization: {
|
|
minimize: true
|
|
},
|
|
output: {
|
|
filename: "dist/[name].js",
|
|
path: __dirname,
|
|
},
|
|
module: {
|
|
rules: [
|
|
{
|
|
test: /\.vue$/,
|
|
loader: "vue-loader",
|
|
},
|
|
// this will apply to both plain `.js` files
|
|
// AND `<script>` blocks in `.vue` files
|
|
{
|
|
test: /\.js$/,
|
|
loader: "babel-loader",
|
|
},
|
|
// this will apply to both plain `.css` files
|
|
// AND `<style>` blocks in `.vue` files
|
|
{
|
|
test: /\.css$/,
|
|
use: ["vue-style-loader", "css-loader"],
|
|
}
|
|
],
|
|
},
|
|
plugins: [
|
|
// make sure to include the plugin for the magic
|
|
new VueLoaderPlugin(),
|
|
],
|
|
};
|