mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Remove nodeExternals, remove inline-source-map, add .js to resolve.extensions
Signed-off-by: Hung-Han (Henry) Chen <1474479+chenhunghan@users.noreply.github.com>
This commit is contained in:
parent
50d46d05f2
commit
2ce17be921
@ -1,7 +1,6 @@
|
|||||||
|
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import webpack from "webpack";
|
import webpack from "webpack";
|
||||||
import nodeExternals from "webpack-node-externals";
|
|
||||||
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
import MiniCssExtractPlugin from "mini-css-extract-plugin";
|
||||||
|
|
||||||
import { sassCommonVars } from "./src/common/vars";
|
import { sassCommonVars } from "./src/common/vars";
|
||||||
@ -11,12 +10,6 @@ export default function (): webpack.Configuration {
|
|||||||
// Compile for Electron for renderer process
|
// Compile for Electron for renderer process
|
||||||
// see <https://webpack.js.org/configuration/target/>
|
// see <https://webpack.js.org/configuration/target/>
|
||||||
target: "electron-renderer",
|
target: "electron-renderer",
|
||||||
externals: [
|
|
||||||
// in order to ignore all modules in node_modules folder
|
|
||||||
// <https://www.npmjs.com/package/webpack-node-externals>
|
|
||||||
nodeExternals()
|
|
||||||
],
|
|
||||||
devtool: 'inline-source-map',
|
|
||||||
entry: './src/extensions/extension-api.ts',
|
entry: './src/extensions/extension-api.ts',
|
||||||
output: {
|
output: {
|
||||||
filename: 'extension-api.js',
|
filename: 'extension-api.js',
|
||||||
@ -73,7 +66,7 @@ export default function (): webpack.Configuration {
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['.ts', '.tsx']
|
extensions: ['.ts', '.tsx', '.js']
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
// In ts-loader's README they said to output a built .d.ts file,
|
// In ts-loader's README they said to output a built .d.ts file,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user