G
G
GyryAnJo2021-06-08 01:07:13
webpack
GyryAnJo, 2021-06-08 01:07:13

How to add webpackDefine plugin to project?

Hi I need to add application build numbers and some string constants to define Plugin. But I couldn't find a manual on how to connect it. In general, do I need to enter a command like vue add define-plugin / or create some file in some directory - how to do it))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GyryAnJo, 2021-06-08
@GyryAnJo

vue.config.js

const webpack = require("webpack");

module.exports = {
  configureWebpack: {
    plugins: [new webpack.DefinePlugin({})],
  },

};

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question