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
const webpackConfig = { resolve: { root: path.join(__dirname, 'node_modules'), alias: { components: '../../components', // 组件别名,js里引用路径可直接 'components/xxx/yyy' reducers: '../../reducers', actions: '../../actions', stores: '../../stores', helpers: '../../helpers' }, extensions: ['', '.js', '.jsx', '.scss', '.css'] }, output: { filename: 'js/[name].js', chunkFilename: 'js/[id].js?[hash]' }, module: { loaders: [ { test: /\.js|jsx$/, exclude: /node_modules/, loader: 'babel-loader?cacheDirectory' }, { test: /\.css$/, loader: ('style-loader', 'css-loader') }, { test: /\.(png|jpe?g|gif)(\?.*)?$/, loader: 'url', query: { limit: 5000, // 换成你想要得大小 name: 'images/[name].[ext]?[hash:10]' } }, { test: /\.(woff2?|eot|ttf|otf|svg)(\?.*)?$/, loader: 'url', query: { limit: 5000, // 换成你想要得大小 name: 'fonts/[name].[hash:7].[ext]' } } ] }, externals: { 'react': 'React', 'react-dom': 'ReactDOM' } }
"presets": [ "es2015", "stage-2", "react", "env" ], "plugins": [ "transform-class-properties", "transform-object-rest-spread", ["import",{ "libraryName": "antd", "style": "css" }] ], "env": { "build": { "optional": ["optimisation", "minification"] } }
The text was updated successfully, but these errors were encountered:
@sorrycc
Sorry, something went wrong.
What's webpack-stream?
No branches or pull requests
webpack
.babelrc
The text was updated successfully, but these errors were encountered: