📜  音乐元数据浏览器缓冲区未定义 - CSS 代码示例

📅  最后修改于: 2022-03-11 14:47:42.202000             🧑  作者: Mango

代码示例1
//In webpack.config.js add (or add to) plugins and resolve 

const webpack = require('webpack');

module.exports = {
    plugins: [
        new webpack.ProvidePlugin({
            Buffer: ['buffer', 'Buffer'],
        }),
        new webpack.ProvidePlugin({
            process: 'process/browser',
        }),
    ],
    
    resolve: {
        extensions: [ '.ts', '.js' ],
        fallback: {
            "stream": require.resolve("stream-browserify"),
            "buffer": require.resolve("buffer")
        }
    },