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

surmon-china picture surmon-china  路  3Comments

vadimsg picture vadimsg  路  3Comments

vadimsg picture vadimsg  路  3Comments

shyamchandranmec picture shyamchandranmec  路  3Comments

msudgh picture msudgh  路  3Comments