How to use script-ext-html-webpack-plugin - 1 common examples

To help you get started, we’ve selected a few script-ext-html-webpack-plugin examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iverenshaguy / book-a-meal / webpack.common.babel.js View on Github external
/* eslint-disable import/no-extraneous-dependencies */
import path from 'path';
import HtmlWebpackPlugin from 'html-webpack-plugin';
import ScriptExtHtmlWebpackPlugin from 'script-ext-html-webpack-plugin';

const htmlPlugin = new HtmlWebpackPlugin({
  title: 'Book A Meal',
  template: 'client/src/index.html',
  filename: 'index.html'
});

const scriptExtHtmlPlugin = new ScriptExtHtmlWebpackPlugin({
  defaultAttribute: 'defer'
});

export default {
  output: {
    path: path.resolve(__dirname, './client/dist'),
    filename: '[name].bundle.js',
    publicPath: '/'
  },
  module: {
    rules: [
      {
        test: /\.(js|jsx)$/,
        exclude: /node_modules/,
        use: [
          {

script-ext-html-webpack-plugin

Enhances html-webpack-plugin functionality with async and defer attributes for script elements

MIT
Latest version published 4 years ago

Package Health Score

50 / 100
Full package analysis

Popular script-ext-html-webpack-plugin functions