Home  >  Q&A  >  body text

javascript - How to configure webpack to introduce external link css and js

Please answer! !
How to configure webpack.config to uniformly inject external link js and css into all html to prevent external link resources from being packaged into the project.

高洛峰高洛峰2683 days ago1075

reply all(1)I'll reply

  • 学习ing

    学习ing2017-06-15 09:25:05

    webpack.config.js

    new HtmlwebpackPlugin({
            template: APP_PATH+'/index.html'
    })
    

    index.html

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Document</title>
        <link rel="stylesheet" href="外部css">
    </head>
    <body>
        <script>外部js</script>
    </body>
    </html>

    reply
    0
  • Cancelreply