You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
892 B
36 lines
892 B
module.exports = [
|
|
// Add support for native node modules
|
|
{
|
|
// We're specifying native_modules in the test because the asset relocator loader generates a
|
|
// "fake" .node file which is really a cjs file.
|
|
test: /native_modules[/\\].+\.node$/,
|
|
use: 'node-loader',
|
|
},
|
|
{
|
|
test: /[/\\]node_modules[/\\].+\.(m?js|node)$/,
|
|
parser: { amd: false },
|
|
use: {
|
|
loader: '@vercel/webpack-asset-relocator-loader',
|
|
options: {
|
|
outputAssetBase: 'native_modules',
|
|
},
|
|
},
|
|
},
|
|
// Put your webpack loader rules in this array. This is where you would put
|
|
// your ts-loader configuration for instance:
|
|
/**
|
|
* Typescript Example:
|
|
*
|
|
* {
|
|
* test: /\.tsx?$/,
|
|
* exclude: /(node_modules|.webpack)/,
|
|
* loaders: [{
|
|
* loader: 'ts-loader',
|
|
* options: {
|
|
* transpileOnly: true
|
|
* }
|
|
* }]
|
|
* }
|
|
*/
|
|
];
|