-
Notifications
You must be signed in to change notification settings - Fork 46
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
Invariant Violation #26
Comments
I'm getting the same error Here's my config
|
Ditto, my webpack config: const path = require('path');
const webpack = require("webpack");
const AssetsPlugin = require('assets-webpack-plugin');
const PrepackWebpackPlugin = require('prepack-webpack-plugin').default;
var options = {
entry: {
app: [path.join(__dirname, 'src', 'business_client.tsx')],
app2: [path.join(__dirname, 'src', 'consumer_client.tsx')],
app3: [path.join(__dirname, 'src', 'signage_client.tsx')],
app4: [path.join(__dirname, 'src', 'menu_client.tsx')],
vendor: [
"react",
"@uifabric/utilities",
"@microsoft/load-themed-styles",
"react-router",
"react-dom",
"react-router-dom",
"history",
"nano-sql-stream",
"nano-sql"
],
charts: [
"recharts"
]
},
output: {
path: path.join(__dirname, 'www', 'public'),
filename: '[name].js',
libraryTarget: 'umd',
umdNamedDefine: true
},
resolve: {
extensions: ['.js', '.ts', '.tsx', '.scss', ".css"]
},
plugins: [
new PrepackWebpackPlugin(),
new webpack.optimize.CommonsChunkPlugin("vendor"),
new AssetsPlugin({ filename: 'www/assets.json' })
],
module: {
loaders: [{
test: /\.ts$|\.tsx$/,
loader: 'ts-loader'
}, {
test: /\.scss$/,
use: [{
loader: "style-loader"
}, {
loader: "css-loader"
}, {
loader: "sass-loader"
}]
}, { test: /\.css$/, loader: "style-loader!css-loader" }]
}
};
switch (process.env.NODE_ENV) {
case "production":
options.output.filename = '[name].[chunkhash].min.js';
options['plugins'] = options['plugins'].concat([
new webpack.optimize.UglifyJsPlugin(),
new webpack.LoaderOptionsPlugin({
minimize: true,
debug: false
})
]);
break;
}
module.exports = options; |
I'd start from looking at whats at Invariant violation means that some expected condition was not met. |
I also had this issue, and resolved it by passing It looks like |
Not sure what causes this error, I'm not able to build using this plugin:
How can I provide more info?
The text was updated successfully, but these errors were encountered: