2017-07-03 69 views
0

我的進口import {keyGen} from 'shared/utils/gen'表示無法解析符號'keyGen'。 NPM包加載工作得很好。 webpack構建也可以成功並且可以與別名一起運行。WebStorm Webpack別名

這裏是我們的別名:

resolve: { 
    extensions: ['.webpack-loader.js', '.web-loader.js', '.loader.js', '.js', '.styl'], 

    alias: { 
    shared: relativePath('./client/source/shared'), 
    root: relativePath('./client/source'), 
    config: relativePath('./') 
    }, 

    modules: [relativePath('./node_modules')] 
} 

我確定正確的WebPack配置文件在項目設置中選擇。我如何讓WebStorm正確識別Webpack別名?

回答

相關問題