-
-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
It works with react-meteor-data@1.0.0 but starting from 2.0.1 withTracker is undefined.
Also react-meteor-data@2.0.1 works without meteor-webpack package.
import { withTracker } from 'meteor/react-meteor-data';
console.log(withTracker); // undefined
// webpack.config.js
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const meteorExternals = require('webpack-meteor-externals');
const path = require('path');
const clientConfig = {
entry: './client/index.js',
module: {
rules: [
{
test: /\.(js|jsx)$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
configFile: path.resolve(__dirname, './.babelrc'),
},
},
},
{
test: /\.s[ac]ss$/i,
loader: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: {
auto: true,
localIdentName: '[path][name]__[local]',
},
},
},
{
loader: 'sass-loader',
},
],
},
{
test: /\.(png|svg|jpg|gif)$/,
use: ['file-loader'],
},
{
test: /\.css$/,
use: ['style-loader', 'css-loader'],
},
{
test: /\.(woff|woff2|eot|ttf|otf)$/,
use: ['file-loader'],
},
],
},
devtool: 'eval-source-map',
output: {
publicPath: '/',
},
resolve: {
alias: {
'/imports': path.resolve(__dirname, './imports'),
},
},
plugins: [
new HtmlWebpackPlugin({
template: './client/index.html',
}),
new webpack.HotModuleReplacementPlugin(),
],
externals: [meteorExternals()],
devServer: {
hot: true,
},
};
const serverConfig = {
entry: ['./server/main.js'],
target: 'node',
devServer: {
hot: true,
},
externals: [meteorExternals()],
resolve: {
alias: {
'/imports': path.resolve(__dirname, './imports'),
},
},
};
module.exports = [clientConfig, serverConfig];
vanhuytali, sfabriece, sebyx07 and Fanaticys
Metadata
Metadata
Assignees
Labels
No labels