Nuxt.js: webpack config for Jetbrains Webstorm

Created on 2 Mar 2018  路  3Comments  路  Source: nuxt/nuxt.js

Webstrom has an option to set path to webpack config. But when I set it to nuxt's webpack config it throws error:

Can't analyse base.config.js: coding assistance will ignore module resolution rules in this file.
Possible reasons: this file is not a valid webpack configuration file or its format is not currently supported by the IDE

I tried to specify webpack/base.config.js, webpack/client.config.js, webpack/server.config.js with no luck.

Maybe you extract parts of webpack config to separate file which Webstorm can analyze?

I want it to teach webstorm to understand ~/ aliases

This question is available on Nuxt.js community (#c2548)

Most helpful comment

I set webpack.config.js on the project root for WebStorm.
That file is invalid for Nuxt and it is valid only for WebStorm.

module.exports = {
  resolve: {
    // for WebStorm
    alias: {
      '@': path.resolve(__dirname),
      '~': path.resolve(__dirname)
    }
  }
};

All 3 comments

I set webpack.config.js on the project root for WebStorm.
That file is invalid for Nuxt and it is valid only for WebStorm.

module.exports = {
  resolve: {
    // for WebStorm
    alias: {
      '@': path.resolve(__dirname),
      '~': path.resolve(__dirname)
    }
  }
};

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

o-alexandrov picture o-alexandrov  路  3Comments

mattdharmon picture mattdharmon  路  3Comments

nassimbenkirane picture nassimbenkirane  路  3Comments

jaredreich picture jaredreich  路  3Comments

uptownhr picture uptownhr  路  3Comments