為什么webpack不支持靜態(tài)字段?當我嘗試時export class Game {#lasttime = 0;#FRAME_DURATION = 1000 / 144;我收到一個錯誤模塊解析失?。阂馔庾址?”(2:4) 您可能需要適當?shù)募虞d程序來處理此文件類型,當前沒有配置加載程序來處理此文件。請參閱https://webpack.js.org/concepts#loaders。問題是什么?const path = require('path');const HTMLPlugin = require('html-webpack-plugin');module.exports = { entry: './src/index.js', output: { filename: 'js/main.js', path: path.resolve(__dirname, 'dist'), }, devtool: 'inline-source-map', devServer: { contentBase: './dist', }, plugins: [ new HTMLPlugin({ template: './src/index.html' }) ],};
Webpack 靜態(tài)字段
幕布斯6054654
2023-08-18 17:35:41