2023-08-01から1ヶ月間の記事一覧

htmlに動的にscriptを挿入するためのサンプル

htmlに動的にscriptを挿入するためのサンプル first.js function loading(scriptSrc) { var script = document.createElement('script'); script.src = scriptSrc; document.head.appendChild(script); } loading('second.js'); <html lang="en"> <head> <meta charset="UTF-8"> </meta></head></html>

webpack学習中

複数のエントリーポイントファイルを持ち、それぞれ別の出力ファイルにバンドルするwebpack.config.jsの例 const path = require('path'); module.exports = { entry: { test1: './src/test1.js', // test1.js をエントリーポイントとして指定 test2: './src…

はじめに

恥の多い人生を送ってきました