Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var path = require("path");
- var webpack = require("webpack");
- const bundleOutputDir = "./wwwroot/dist";
- require("babel-polyfill");
- const VuetifyLoaderPlugin = require("vuetify-loader/lib/plugin");
- module.exports = {
- mode: "production",
- context: __dirname,
- plugins: [new VuetifyLoaderPlugin()],
- entry: { main: "./FrontEnd/index.js" },
- module: {
- rules: [
- {
- test: /\.s(c|a)ss$/,
- use: [
- "vue-style-loader",
- "css-loader",
- {
- loader: "sass-loader",
- options: {
- implementation: require("sass"),
- fiber: require("fibers")
- }
- }
- ]
- },
- {
- test: /\.vue$/,
- loader: "vue-loader",
- options: {
- loaders: {
- scss: ["vue-style-loader", "css-loader"]
- }
- }
- },
- {
- test: /\.js$/,
- loader: "babel-loader",
- exclude: /node_modules/
- },
- {
- test: /\.(png|jpg|gif|svg)$/,
- loader: "file-loader",
- options: {
- name: "[name].[ext]?[hash]"
- }
- }
- ]
- },
- resolve: {
- alias: {
- vue$: "vue/dist/vue.esm.js"
- },
- extensions: ["*", ".js", ".vue", ".json"]
- },
- devServer: {
- historyApiFallback: true,
- noInfo: true,
- overlay: true
- },
- performance: {
- hints: false
- },
- output: {
- path: path.join(__dirname, bundleOutputDir),
- filename: "[name].js",
- publicPath: "dist/"
- },
- devtool: "#eval-source-map"
- };
- if (process.env.NODE_ENV === "production") {
- module.exports.devtool = "#source-map";
- module.exports.plugins = (module.exports.plugins || []).concat([
- new webpack.DefinePlugin({
- "process.env": {
- // eslint-disable-next-line quotes
- NODE_ENV: '"production"'
- }
- }),
- new webpack.optimize.UglifyJsPlugin({
- sourceMap: true,
- compress: {
- warnings: false
- }
- }),
- new webpack.LoaderOptionsPlugin({
- minimize: true
- }),
- new webpack.optimize.ModuleConcatenationPlugin()
- ]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement