Questions tagged [webpack]
The webpack tag has no usage guidance.
19 questions
0
votes
1
answer
296
views
can't refer my external library package as a single entry in config.json
I created a few libraries that I use in webapps and the webpack in the cosumer app is able to resolve the lib root when added to the externals in webpack and not bundle anything that comes from that ...
2
votes
1
answer
461
views
I can't make external component library work on SPFX
I have a component library that uses react as an external dependency it works alright from anywhere I tested.
I tried recently to import it from a spfx package and it keeps giving this error:
What I ...
0
votes
2
answers
2k
views
Using custom fonts in spfx web parts
I have a custom web part that displays weather data and I'm using a custom icon font to go along with the data.
It works on the hosted workbench but when I package the solution and deploy it on my ...
0
votes
3
answers
1k
views
NPM packages for React webpart SharePoint Online try to access 'fs' on client side but it's not even necessary? React SPFX
While there is a correct answer already given at:
SPFx Unable to use 'fs' module
its missing the part that in webpack config it can be outflagged like this:
node: { fs: 'empty' },
Module ...
0
votes
0
answers
84
views
SPFx Solution has a warning stopping production builds has anyone seen it before?
I have been supporting an SPFx solution and I am required to make a small change however it will no longer build.
I have tried pulling the last version back down from our repository but it has the ...
1
vote
1
answer
488
views
Can I change webpack version in spfx's build tools?
So I'm working with spfx v1.8.2 and I cannot find any options or documentation even to solutions how upgrade or override webpack used by that build tools.
Is there a possibility to do that without ...
2
votes
2
answers
3k
views
Workbench issues with spfx 18.2 and react 16.8.4
I have recently updated a number of modern spfx webparts to spfx 18.2 and this morning when I try to debug in workbench (locally and on tenant) I am getting serve errors in relation to react and react-...
0
votes
0
answers
157
views
spfx how to minify files for own CDN
Original question was, whether is it possible to somehow extend the webpack/gulp inside of spfx solution to have an extra task to minify some js files supposed to move to Office365 CDN?
I would need ...
0
votes
0
answers
260
views
package error when building spfx webpart
I am using the following breadcrum sample. To reproduce the error use command: gulp serve
Error I got:
./src/extensions/siteBreadcrumb/SiteBreadcrumbApplicationCustomizer.ts
Module parse failed:...
1
vote
0
answers
352
views
Set current user in Fabric.UI people picker
I'm struggling setting the current user to a people picker control in Office.Fabric.UI
const people: (IPersonaProps & { key: string | number })[] = [
{
key: 1,
imageInitials: 'PV',
...
1
vote
3
answers
1k
views
Reactjs, TypeScript & Webpack on SharePoint2013
I know that Reactjs, TypeScript & Webpack can be used on SharePoint Online to create web-parts. But can it be possible to create web-parts for SharePoint 2013 on premise. Please let me know if it ...
0
votes
2
answers
645
views
Handlebars with spfx, Module not found
I am trying to use handlebars in a client webpart using these posts:
https://n8d.at/blog/how-to-use-handlebars-in-sharepoint-framework-projects-spfx/
https://n8d.at/blog/first-handlebars-web-part-in-...
2
votes
1
answer
309
views
Problems Unit Testing in SharePoint Framework (SPFx) with External Dependencies
I'm attempting to use Elio and Velin's guidance on creating unit tests for the SharePoint framework. Both appear to work great for vanilla components, but I'm running into problems when trying to ...
1
vote
1
answer
594
views
SPFx - How to protect and minify my output bundle.js
When i deploy my solution.sppkg i want to protect my output bundle js to avoid js injection?
How to minify bundle.js with gulp task?
How to do this?
3
votes
1
answer
315
views
SharePoint 2013 : Calling function in javascript file from Ribbon button
I am trying to call a function in an external javascript file from SharePoint 2013 ribbon button. I have a Typescript file and i am using Webpack to transcompile it to javascript. When i try to call ...
2
votes
3
answers
7k
views
webpack "Module not found: Error: Cannot resolve 'file' or 'directory"
I successfully followed and executed 6 of the 7 SPX tutorials. In the last one "Document Card Example", I get the following error during build:
[16:20:50] Starting subtask 'configure-webpack'...
[16:...
1
vote
0
answers
455
views
SASS/SCSS sourcemap on sharepoint framework webpack
Is there any way load the sass/scss file as the sourceMap in dev mode? I understand that sharepoint framework is using webpack which transpiles all sass/scss files into css then render it within the &...
3
votes
2
answers
857
views
SharePoint Framework: Module not loaded correctly when pressing F5 in IE
I need to load the jquery-typeahead library in my SPFx web part. I register this dependency by adding it to "config\config.json" like this:
"externals": {
"jquery": {
"path": "./...
1
vote
1
answer
725
views
Would multiple SPFx webparts on page load duplicate dependencies?
If I have an SPFx webpart and that webpart uses these dependencies:
jQuery
jQueryUI
Angular
LoDash
Then I have another SPFx webpart and that one uses:
jQuery
jQueryUI
React
Moment
If I load ...