我在项目中使用react-id-swiper,但IE11中断了该应用程序。我读到您需要使用webpack配置进行转换,但这不适用于Next.js webpack。
next.config.js
const webpack = require("webpack");
module.exports = {
webpack: (config, { defaultLoaders }) => {
config.module.rules.push({
exclude: [/node_modules\/(?!(swiper|dom7)\/).*/, /\.test\.js(x)?$/],
test: /\.js(x)?$/,
use: defaultLoaders.babel
});
return config;
}
};
答案 0 :(得分:0)
上周发生了同样的问题,next-transpile-modules
救了我。下一步将不会传输额外的NPM软件包。很令人沮丧,但至少存在。