sp-dev-fx-webparts/samples/react-password-vault/fast-serve/webpack.extend.js

32 lines
960 B
JavaScript

/*
* User webpack settings file. You can add your own settings here.
* Changes from this file will be merged into the base webpack configuration file.
* This file will not be overwritten by the subsequent spfx-fast-serve calls.
*/
const path = require('path');
// you can add your project related webpack configuration here, it will be merged using webpack-merge module
// i.e. plugins: [new webpack.Plugin()]
const webpackConfig = {
resolve: {
alias: {
"@webparts": path.resolve(__dirname, "..", "src/webparts"),
"@src": path.resolve(__dirname, "..", "src"),
}
}
}
// for even more fine-grained control, you can apply custom webpack settings using below function
const transformConfig = function (initialWebpackConfig) {
// transform the initial webpack config here, i.e.
// initialWebpackConfig.plugins.push(new webpack.Plugin()); etc.
return initialWebpackConfig;
}
module.exports = {
webpackConfig,
transformConfig
}