Comments (12)
When you say all, if you comment out the file does another one throw?
from meteor-webpack-react.
Try removing the uglify plugin from the prod config.... Meteor is going to minify it anyway unless the minified package is taken out manually.
from meteor-webpack-react.
I can confirm that removing uglify in prod helped:
// file: webpack.config.client.prod.js
var webpack = require('webpack');
var config = require('./webpack.config.client');
var _ = require('lodash');
var config = module.exports = _.assign(_.cloneDeep(config), {
plugins: (config.plugins || []).concat([
new webpack.DefinePlugin({
'process.env': {
NODE_ENV: JSON.stringify('production'),
}
}),
new webpack.NoErrorsPlugin(),
new webpack.optimize.DedupePlugin(),
// new webpack.optimize.UglifyJsPlugin({
// compress: { warnings: false }
// }),
new webpack.optimize.AggressiveMergingPlugin(),
new webpack.optimize.OccurenceOrderPlugin(true),
]),
});
from meteor-webpack-react.
Althought I'm puzzeled by this ;/ I am using template strings all around my project, but the only file it reallly minds is where my i18n strings are stored. I tried to move theimport around my project but no success.
I have in my router.tsx two imports
import "./someother" // has template strings and life is good
import "./i18n" // has template strings and life is miserable
Do you have any idea of why uglify and everything else would complain?
from meteor-webpack-react.
Huh. That's odd because all backticks for template strings should be compiled out into ES5 by babel. Can you copy and paste that line from i18n.en.jsx
?
from meteor-webpack-react.
Here it goes
mf["languages"].en = {
"activity": "Activity",
"add": "Add",
}
mf["languages"].en["privacyPolicy.text"] = `
This privacy policy has been compiled to better serve those who are concerned with how their 'Personally identifiable information' (PII) is being used online. PII, as used in privacy law and information security, is information that can be used on its own or with other information to identify, contact, or locate a single person, or to identify an individual in context. Please read our privacy policy carefully to get a clear understanding of how we collect, use, protect or otherwise handle your Personally Identifiable Information in accordance with our website.
**What personal information do we collect from the people that visit our blog, website or app?**
When ordering or registering on our site, as appropriate, you may be asked to enter your name, email address, mailing address or other details to help you with your experience.
**When do we collect information?**
We collect information from you when you register on our site or enter information on our site.
...`
from meteor-webpack-react.
Huh, maybe there's a bug when transpiiling multiline strings like that? you should be able to take a look at the transpiled output you get without UglifyJS and see if it contains a ` character
from meteor-webpack-react.
@jedwards1211 I'm transpiling to ES6. So the ` symbol is preserved in all output *.js files. The weird part is, that it only complains in some of the *.js files, while others are fine.
from meteor-webpack-react.
Huh, well, I have no idea if UglifyJS works on ES6. I wouldn't assume it does; do you know if it's officially supposed to?
from meteor-webpack-react.
Is it practical to use some ES6 features in the browser yet? I haven't really been keeping up with this yet
from meteor-webpack-react.
I misunderstood ... it is the babel that does not pick up those template strings and I'm not sure why. Then the uglify freaks out. So it must be a bug in babel as in some files it transpiles template strings to es5 and in some not :/
from meteor-webpack-react.
Ah, yeah, I was wondering if it maybe has bugs with multiline ` strings. Anyway, I'll close this issue
from meteor-webpack-react.
Related Issues (20)
- Stripe integration HOT 1
- Calling configure method of useraccounts package causes error HOT 2
- WebPack Syntax Error on Windows
- Why would dev.js build server only?? HOT 2
- CoffeeScript/ Usage with meteord HOT 2
- How to: Server side debugging? HOT 2
- npm WARN deprecated [email protected]: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0 npm WARN deprecated [email protected]: lodash@<2.0.0 is no longer maintained. Upgrade to lodash@^3.0.0 HOT 3
- TypeError: Cannot read property 'loginButtons' of undefined HOT 4
- Screen stays at "Loading" HOT 2
- mailgun-js HOT 2
- Meteor 1.3 HOT 18
- Adding loaders to webpack.config.client.js HOT 2
- Code splitting doesn't work in production (because only main chunk gets copied to meteor folder) HOT 12
- Cannot import meteor modules HOT 1
- Problem using Elasticsearch HOT 4
- Weird debug issues -- out of the box HOT 1
- [ERROR] Cannot find Cannot find module 'temp' , core-js-no-number when running dev HOT 2
- GET http://localhost:9090/ 502 Bad Gateway HOT 6
- Trying to bundle a pure node.js application HOT 2
- Webpack issue loading static files HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from meteor-webpack-react.