Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue add [plugin name] doesnt work #963

Closed
riyasat opened this issue Mar 8, 2018 · 6 comments
Closed

vue add [plugin name] doesnt work #963

riyasat opened this issue Mar 8, 2018 · 6 comments

Comments

@riyasat
Copy link

riyasat commented Mar 8, 2018

Hi,
I had started using Vue/Cli v3.0 it looks awesome except it doesn't work for 3rd party plugins e.g when I try to install webpack-obfuscator with
$ vue add webpack-obfuscator

I get following error.

Installing vue-cli-plugin-webpack-obfuscator...

npm ERR! code E404
npm ERR! 404 Not Found: vue-cli-plugin-webpack-obfuscator@latest

I thought it might be this package doesn't exist in NPM but when I install with NPM install webpack-obfuscator it does install the plugin to node_modules.

Even though I installed it with NPM I am not able to invoke the plugin using vue.config.js. my config looks like


module.exports = {
  configureWebpack: {
    plugins: [
      new JavaScriptObfuscator(
        {
          rotateUnicodeArray: true,
          renameGlobals: true,
          stringArray: true,
          stringArrayEncoding: true,
          stringArrayThreshold: 0.5,
          target: "browser"
        },
        ["static/js/vendor**", "static/js/manifest**"]
      )
    ]
  }
};

I am struggling to install 3rd party plugins in VUE project. Please suggest how can I use 3rd party plugins. I had read documentation carefully but the provided guide lines doesn't work for me. I tried

vue add vue-container
vue add vue-i18n

with few others but none of them seems to work.

@vue-bot
Copy link

vue-bot commented Mar 8, 2018

Hello, your issue has been closed because it does not conform to our issue requirements. In order to ensure every issue provides the necessary information for us to investigate, we require the use of the Issue Helper when creating new issues. Thank you!

@vue-bot vue-bot closed this as completed Mar 8, 2018
@ghost
Copy link

ghost commented Apr 4, 2018

Got the same issue ... but I guess you wil not get into it !

@Akryum
Copy link
Member

Akryum commented Apr 4, 2018

Any npm package is not necessary a vue-cli plugin. vue add and vue invoke only work with vue-cli plugins.

@yyx990803
Copy link
Member

vue add is only for vue-cli plugins. For webpack plugins you still install them with npm or yarn...

@ghost
Copy link

ghost commented Apr 5, 2018

this not the issue I guess, once installed w npm/yan , hos to add them into the webpack config... ?
module.exports = {
configureWebpack: {
plugins: [
new JavaScriptObfuscator(

@riyasat
Copy link
Author

riyasat commented Apr 5, 2018

@Erwin16 You have to add
var JavaScriptObfuscator = require('webpack-obfuscator');
before you use

module.exports = {
configureWebpack: {
plugins: [
new JavaScriptObfuscator(

all plugins you installed with npm/yarn should work as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants