From 93e5395e7ffa211cabc69164384153d5d5567981 Mon Sep 17 00:00:00 2001 From: pengjie <37610029@qq.com> Date: Thu, 4 Feb 2021 23:11:07 +0800 Subject: [PATCH] :sparkles: add source-map for example --- example/index.html | 1 - example/webpack.config.js | 186 ++++++++++++++++++++------------------ package.json | 2 +- yarn.lock | 8 +- 4 files changed, 102 insertions(+), 95 deletions(-) diff --git a/example/index.html b/example/index.html index 9da805c65..6c217c628 100644 --- a/example/index.html +++ b/example/index.html @@ -1,2 +1 @@
- diff --git a/example/webpack.config.js b/example/webpack.config.js index deb7e27be..034f492df 100644 --- a/example/webpack.config.js +++ b/example/webpack.config.js @@ -1,97 +1,105 @@ const path = require('path') +const HtmlWebpackPlugin = require('html-webpack-plugin') const VueLoaderPlugin = require('../lib/plugin') -module.exports = { - mode: 'development', - entry: path.resolve(__dirname, './main.js'), - output: { - path: path.resolve(__dirname, 'dist'), - filename: 'bundle.js', - publicPath: '/dist/' - }, - devServer: { - stats: "minimal", - contentBase: __dirname - }, - module: { - rules: [ - // { loader: require.resolve('./debugger') }, - { - test: /\.vue$/, - loader: 'vue-loader' - }, - // example to apply loader to a custom block without lang="xxx" - // this rule applies to blocks - { - resourceQuery: /blockType=foo/, - loader: 'babel-loader' - }, - // example configuring preprocessor for