webpack4→webpack5ããã¦、Module not found: Error: Can't resolveãåºãå ´å、'html-loader'ãåé¤ãã
webpack4→webpack5ã§ããã£ã ä¹
ã
ã®LooxUã¨åé³ãã¯ã§è¡ãã!ã®æ´æ°。çæ§ãä¹
ãã¶ãã§ã。 ä»åã¯、webpack4ããwebpack5ã¸ç§»è¡ããéã«ããã£ãåºæ¥äºã«ã¤ãã¦è¨è¼ãããã¨æãã¾ã。 äºè±¡ Module not found: Error: Can't resolve '/manifest.json' ã¨ã©ã¼ã¡ãã»ã¼ã¸ã¨ãã¦ã¯、ä¸è¨ã®æ§ãªã¡ãã»ã¼ã¸ãåºã¦ãã¾ãã。 ãªãã¨ãªã、html-webpack-pluginã§å¼ã³åºãã¦ããç®æã«åé¡ããããã。 ããã、ãã®è¨å®ãè¦ãéãç¹ã«å¤ãªæ¸ãæ¹ã¨ãããã¦ããªãã£ãã®ã§、ä¸ä½ä½ãåé¡ãªã®ããã°ããåããã¾ããã§ãã。 åå 解æ html-webpack-pluginã® templateã®ããã¥ã¡ã³ã ãèªãã§ãã¦、åå ã«æ°ãä»ãã¾ãã。 1) Don't set any loader ãããã¼! webpack.config.jsã«æ¸ãã¦ãã£ã、 module: { rules: [ { test: /\.html$/, loader: 'html-loader' }], }, ãã®é¨åãç¡å¹åãããç¡äºã«è§£æ±ºãã¾ãã。 ããã、ã¨ãã§ããªãæã«è½ã¨ãç©´ããããã®ã§ã(ç¬)