README
webextension-toolbox-typescript
Version 2 works with webpack 5 and earlier versions will work with 4
This is a module that allows you to add typescript support to webextension-toolbox, including root files and typescript with xml tsx.
npm install webextension-toolbox-typescript --save
Usage
webextension-toolbox-typescript exports out an export named withTypescript. This should be used in a webextension-toolbox-config.js
in the root of your directory.
const { withTypescript } = require("webextension-toolbox-typescript");
module.exports = {
webpack: withTypescript(),
};
If you wish to continue to configure your webpack configuration you can use the webpack option on withTypescript.
const { withTypescript } = require("webextension-toolbox-typescript");
module.exports = {
webpack: withTypescript({
webpack: (config, { dev, vendor }) => {
// Modify the config.
return config;
},
}),
};