Nuxt.js: 引入外部文件问题

Created on 20 Nov 2017  ·  5Comments  ·  Source: nuxt/nuxt.js

如何引入外部js 强刷之后外部js不见了 无法找到文件
1ftbhf158 2bbj e 3 k t

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

Most helpful comment

Try this out:

nuxt.config.js

  build: {
    plugins: [
      new webpack.ProvidePlugin({
        '$': 'jquery',
        'jQuery': 'jquery'
      })
    ]
  }

All 5 comments

Try this out:

nuxt.config.js

  build: {
    plugins: [
      new webpack.ProvidePlugin({
        '$': 'jquery',
        'jQuery': 'jquery'
      })
    ]
  }

为什么这样写 强制刷新 会出现$无法找到的问题 官网文档也是这样写的啊
og n 3t h651 co1 bo i
ge1 o6noce46u_0v9uq cta

@18717700273 你直接使用npm的jquery吧,然后配置vender打包到一起

为什么会出现这样的问题

Uploading 04fcdde364337ed90dd37de8b6d2817.png…

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

nassimbenkirane picture nassimbenkirane  ·  3Comments

VincentLoy picture VincentLoy  ·  3Comments

surmon-china picture surmon-china  ·  3Comments

vadimsg picture vadimsg  ·  3Comments

bimohxh picture bimohxh  ·  3Comments