第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

如何正確配置webpack?

如何正確配置webpack?

慕森王 2023-08-10 15:42:09
我認(rèn)為配置 webpack 時(shí)遇到了一些問題。我正在一步步制作教程,但它不起作用。錯(cuò)誤] 無法在項(xiàng)目商店上執(zhí)行目標(biāo) com.github.eirslett:frontend-maven-plugin:1.10.3:webpack (webpack build):無法運(yùn)行任務(wù):&ldquo;webpack.js&rdquo;失敗。org.apache.commons.exec.ExecuteException:進(jìn)程退出并出現(xiàn)錯(cuò)誤:2錯(cuò)誤看起來像:[INFO] ERROR in ./src/main/js/app.js[INFO] Module not found: Error: Can't resolve './client' in '/home/kk/IdeaProjects/e-commerce/src/main/js'[INFO]? @ ./src/main/js/app.js 29:13-32[INFO]?[INFO] ERROR in ./src/main/js/app.js[INFO] Module not found: Error: Can't resolve 'react' in '/home/kk/IdeaProjects/e-commerce/src/main/js'[INFO]? @ ./src/main/js/app.js 25:12-28[INFO]?[INFO] ERROR in ./src/main/js/app.js[INFO] Module not found: Error: Can't resolve 'react-dom' in '/home/kk/IdeaProjects/e-commerce/src/main/js'[INFO]? @ ./src/main/js/app.js 27:15-35webpack.config.js:var path = require('path');module.exports = {? ? entry: './src/main/js/app.js',? ? devtool: 'sourcemaps',? ? cache: true,? ? mode: 'development',? ? output: {? ? ? ? path: __dirname,? ? ? ? filename: './src/main/resources/static/built/bundle.js'? ? },? ? module: {? ? ? ? rules: [? ? ? ? ? ? {? ? ? ? ? ? ? ? test: path.join(__dirname, '.'),? ? ? ? ? ? ? ? exclude: /(node_modules)/,? ? ? ? ? ? ? ? use: [{? ? ? ? ? ? ? ? ? ? loader: 'babel-loader',? ? ? ? ? ? ? ? ? ? options: {? ? ? ? ? ? ? ? ? ? ? ? presets: ["@babel/preset-env", "@babel/preset-react"]? ? ? ? ? ? ? ? ? ? }? ? ? ? ? ? ? ? }]? ? ? ? ? ? }? ? ? ? ]? ? }};應(yīng)用程序.js:'use strict';const React = require('react');const ReactDOM = require('react-dom');const client = require('./client');class App extends React.Component {...}class EmployeeList extends React.Component{...}class Employee extends React.Component{...}ReactDOM.render(<App/>, document.getElementById('react'))
查看完整描述

1 回答

?
當(dāng)年話下

TA貢獻(xiàn)1890條經(jīng)驗(yàn) 獲得超9個(gè)贊

看來您需要從提供的教程中復(fù)制粘貼package.json片段并運(yùn)行npm i



查看完整回答
反對(duì) 回復(fù) 2023-08-10
  • 1 回答
  • 0 關(guān)注
  • 106 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)