-
Notifications
You must be signed in to change notification settings - Fork 0
/
next.config.js
34 lines (28 loc) · 948 Bytes
/
next.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const withPlguins = require("next-compose-plugins");
const path = require("path");
module.exports = withPlguins([
], {
future: {webpack5: true},
webpack: (config, options) => {
config.output.globalObject = `(typeof self !== 'undefined' ? self : this)`;
config.output.publicPath = "/_next/";
config.output.chunkFilename = options.isServer
? `${options.dev ? '[name]' : '[name].[fullhash]'}.js`
: `static/chunks/${options.dev ? '[name]' : '[name].[fullhash]'}.js`;
config.resolve = {
...config.resolve,
alias: {
...config.resolve.alias,
"standardized-audio-context": "standardized-audio-context/build/es5/bundle",
"audio-worklet": path.resolve(__dirname, "src/util/audio-worklet")
}
}
config.module.parser = {
...config.module.parser,
javascript: {
worker: ["AudioWorklet from audio-worklet", "..."]
}
}
return config;
}
});