diff options
author | Determinant <ted.sybil@gmail.com> | 2019-02-13 01:11:31 -0500 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2019-02-13 01:11:31 -0500 |
commit | c594888953151ddfb4ca04b7752bfd51edc1d6da (patch) | |
tree | 59b6d0b0f514f76d152eee9a4359c08110f73531 /webpack.config.js | |
parent | f28b818cc62c7fff67517a4147e64f08ebd73027 (diff) |
WIP: migrate to TypeScriptX
Diffstat (limited to 'webpack.config.js')
-rw-r--r-- | webpack.config.js | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/webpack.config.js b/webpack.config.js index 49261a0..da6d978 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -5,20 +5,29 @@ module.exports = (env, argv) => { const prodMode = argv.mode == 'production'; return { entry: { - index: "./src/index.js", - background: "./src/background.js", - popup: "./src/popup.js" + index: "./src/index.tsx", + background: "./src/background.ts", + popup: "./src/popup.tsx" }, output: { path: path.join(__dirname, "/dist"), filename: "[name].js" }, + resolve: { + extensions: [".ts", ".tsx", ".js", ".json"] + }, + devtool: "source-map", module: { rules: [ { - test: /\.js$/, + test: /\.tsx?$/, exclude: /node_modules/, - use: ['babel-loader', 'eslint-loader'] + use: ['ts-loader'] + }, + { + test: /\.js$/, + use: ["source-map-loader"], + enforce: "pre" }, { test: /\.css$/, |