Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

webpackConfig 增加DefinePlugin,运行失败 #355

Open
whizbz11 opened this issue Feb 21, 2024 · 1 comment
Open

webpackConfig 增加DefinePlugin,运行失败 #355

whizbz11 opened this issue Feb 21, 2024 · 1 comment

Comments

@whizbz11
Copy link

配置文件:
finalize(webpackConfig) {
webpackConfig.plugins.push(
new DefinePlugin({
'process.env.REQUEST_ENV': JSON.stringify(process.env.REQUEST_ENV),
}),
);
webpackConfig.module.rules.push({
test: /.md$/i,
use: 'raw-loader'
});
webpackConfig.module.rules.push({
test: /.html$/i,
use: 'html-loader'
});
// console.log('--DefinePlugin--',DefinePlugin);

        webpackConfig.resolve.fallback = {
            fs: false
        };

        return webpackConfig;
    }
},

运行会报错:
Command failed, you may submit a issue to https://github.com/ecomfe/reskript/issues/new

@otakustay
Copy link
Member

跑一下SKR_LOGGING=debug skr build(你原先是什么命令报错就什么命令,只加前面的环境变量),看下具体报错是什么

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants