UglifyJS error during gulp bundle --ship
See original GitHub issueOne of our projects use the library for querying against sharepoint lists. The project runs ok on dev, but generates a build error once we try to build for production.
steps to reproduce:
- create new ms spfx project using yoeman generator (webpart, o365 only)
- npm install linqts --save
- use library in code
import { List } from 'linqts';
export default class SampleFabric extends React.Component<ISampleFabricProps, {}> {
public render(): React.ReactElement<ISampleFabricProps> {
let dataList = new List(["a", "b"]);
...
}
- gulp bundle --ship
returns this error:
Error - [webpack] 'dist':
sample-fabric-web-part.js from UglifyJs
Unexpected token: operator (>) [sample-fabric-web-part.js:738,10]
reverting to v1.10.0 (npm install --save-exact linqts@1.10.0
) will allow the build to complete.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Error - [webpack] 'dist': web-part.js from UglifyJs Unexpected ...
run gulp bundle --ship and gulp package-solution --ship to package the webpart ... The build always fails at step 3 with following error....
Read more >Correcting SPFx gulp –ship Uglify Errors: Unexpected token
We came across the following problem when trying to execute a gulp --ship on out SPFx development [15:03:34] Starting subtask 'webpack'.
Read more >Dealing with package errors when building SharePoint ...
When I ran gulp --ship to prepare the bundle I got the following error: ... Something broke when the build process was running...
Read more >"[webpack] 'dist': web-part.js from UglifyJs Unexpected token ...
When we started with the deployment process and while running the "gulp bundle --ship" command, it throws an error message as "[webpack] ...
Read more >webpack -p error: ERROR in bundle.js from UglifyJs
The problem is that UglifyjsWebpackPlugin doesn't support minification of ES6 code. You should add babel loader or change uglify-js ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Tomorrow I’ll release a new version reestablishing the dist version to
es5
, should fix this issue and @huserben’s one as well! 😄thanks!