Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gdonega/c84799cfe5a6ce347c66c2200a2a61d4 to your computer and use it in GitHub Desktop.
Save gdonega/c84799cfe5a6ce347c66c2200a2a61d4 to your computer and use it in GitHub Desktop.
Webpack prod versão #1
const HtmlWebpackPlugin = require("html-webpack-plugin");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const merge = require("webpack-merge");
const base = require("./base");
const path = require("path");
const { VueLoaderPlugin } = require('vue-loader')
module.exports = merge(base, {
mode: "production",
devtool: "nosources-source-map",
plugins: [
new VueLoaderPlugin(),
new MiniCssExtractPlugin(),
new HtmlWebpackPlugin({
template: path.resolve(__dirname, "../../../src/vue.index.prod.html"),
filename: "index.html"
})
],
resolve: {
alias: {
'vue$': 'vue/dist/vue.esm.js'
}
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment