We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
在.webpackrc.js中后加入类似webpack.config.js的loader配置 webpackConfig.module.rules.unshift({ test: /\.jsx?$/, loader: 'es3ify-loader', });
webpackConfig.module.rules.unshift({ test: /\.jsx?$/, loader: 'es3ify-loader', });
提供一个可配置的字段如: rules: [{test: /\.jsx?$/, loader: 'es3ify-loader'}]
rules: [{test: /\.jsx?$/, loader: 'es3ify-loader'}]
并没有这么一个字段
无
知道可以使用webpack.config.js来配置loader,但是webpack.config.js不支持babel的plugins 比如在webpack.config.js内写入 webpackConfig.babel.plugins.push('transform-runtime') 会提示找不到babel下的plugins, 所以切换到.webpackrc.js来配置,结果发现loader有配置不来,该如何解决?
webpackConfig.babel.plugins.push('transform-runtime')
The text was updated successfully, but these errors were encountered:
@zjjjjjjjjjjd 求救,我新建了一个webpack.config.js,在里面配置了loader,但是提示
TypeError: customConfigFn is not a function
我的webpack.config.js代码如下
const config = { module: { rules: [ { test: /\.css|less$/, use: [ "style-loader", { loader: "css-loader", options: { importLoaders: 2 } }, "postcss-loader", "less-loader", ], }, ], }, }; module.exports = config;
我就想增加postcss-laoder。
Sorry, something went wrong.
getUserConfig ⬇️ getConfig ⬇️ applyWebpackConfig
大家可以参考下af-webpack获取webpackConfig的过程就明白了
No branches or pull requests
Environment(required) | 环境(必填)
What did you do? Please provide steps to re-produce your problem.(请提供复现步骤)
在.webpackrc.js中后加入类似webpack.config.js的loader配置
webpackConfig.module.rules.unshift({ test: /\.jsx?$/, loader: 'es3ify-loader', });
What do you expected?(预期的正常效果)
提供一个可配置的字段如:
rules: [{test: /\.jsx?$/, loader: 'es3ify-loader'}]
What happen?(发生了何种非正常现象)
并没有这么一个字段
Re-producible online demo (可复现的在线demo)
无
场景说明
知道可以使用webpack.config.js来配置loader,但是webpack.config.js不支持babel的plugins
比如在webpack.config.js内写入
webpackConfig.babel.plugins.push('transform-runtime')
会提示找不到babel下的plugins,
所以切换到.webpackrc.js来配置,结果发现loader有配置不来,该如何解决?
The text was updated successfully, but these errors were encountered: