mirror of
https://github.com/vale981/tridactyl
synced 2025-03-04 17:11:40 -05:00
Re-enable typechecking on proper builds
This commit is contained in:
parent
9c300ecc62
commit
8079d124e6
3 changed files with 60 additions and 58 deletions
|
@ -69,13 +69,14 @@ if [ "$QUICK_BUILD" != "1" ]; then
|
|||
scripts/make_tutorial.sh
|
||||
scripts/make_docs.sh
|
||||
|
||||
webpack --stats errors-only --bail
|
||||
else
|
||||
|
||||
echo "Warning: dirty rebuild. Skipping docs and metadata..."
|
||||
echo "Warning: dirty rebuild. Skipping docs, metadata and type checking..."
|
||||
webpack --stats errors-only --bail --env quick
|
||||
|
||||
fi
|
||||
|
||||
webpack --stats errors-only --bail
|
||||
|
||||
# "temporary" fix until we can install new native on CI: install the old native messenger
|
||||
if [ "$OLD_NATIVE" = "1" ]; then
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"esModuleInterop": true,
|
||||
"isolatedModules": true,
|
||||
"noImplicitAny": false,
|
||||
"noEmitOnError": true,
|
||||
"outDir": "build/tsc-out",
|
||||
|
|
|
@ -3,65 +3,68 @@ const CopyWebPackPlugin = require("copy-webpack-plugin")
|
|||
|
||||
const fileExtensions = [".ts", ".tsx", ".js", ".json"]
|
||||
|
||||
module.exports = {
|
||||
module.exports = function(env, argv) {
|
||||
return {
|
||||
|
||||
mode: "development",
|
||||
// mode: "production", // Uncomment me for less helpful error messages
|
||||
mode: "development",
|
||||
// mode: "production", // Uncomment me for less helpful error messages
|
||||
|
||||
// Enable sourcemaps for debugging webpack's output.
|
||||
devtool: "source-map",
|
||||
// devtool: "inline-source-map", // Uncomment me for more helpful error messages
|
||||
// Enable sourcemaps for debugging webpack's output.
|
||||
devtool: "source-map",
|
||||
// devtool: "inline-source-map", // Uncomment me for more helpful error messages
|
||||
|
||||
entry: {
|
||||
background: "./src/background.ts",
|
||||
content: "./src/content.ts",
|
||||
commandline_frame: "./src/commandline_frame.ts",
|
||||
help: "./src/help.ts",
|
||||
newtab: "./src/newtab.ts",
|
||||
},
|
||||
output: {
|
||||
filename: "[name].js",
|
||||
path: __dirname + "/build",
|
||||
},
|
||||
|
||||
|
||||
resolve: {
|
||||
// Add '.ts' and '.tsx' as resolvable extensions.
|
||||
extensions: fileExtensions,
|
||||
plugins: [new TsconfigPathsPlugin({extensions: fileExtensions})],
|
||||
fallback: {
|
||||
"url": false,
|
||||
"fs": false,
|
||||
"https": false,
|
||||
"http": false,
|
||||
"path": false,
|
||||
"timers": false,
|
||||
"stream": require.resolve("stream-browserify"),
|
||||
entry: {
|
||||
background: "./src/background.ts",
|
||||
content: "./src/content.ts",
|
||||
commandline_frame: "./src/commandline_frame.ts",
|
||||
help: "./src/help.ts",
|
||||
newtab: "./src/newtab.ts",
|
||||
},
|
||||
output: {
|
||||
filename: "[name].js",
|
||||
path: __dirname + "/build",
|
||||
},
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
// All files with a '.ts' or '.tsx' extension will be handled by 'ts-loader'.
|
||||
{ test: /\.ts?$/, loader: "esbuild-loader", options: { loader: "ts", target: "firefox68" } },
|
||||
|
||||
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
|
||||
{ enforce: "pre", test: /\.js$/, loader: "source-map-loader" },
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new CopyWebPackPlugin({patterns: [
|
||||
{ from: "src/manifest.json" },
|
||||
{
|
||||
from: "src/static",
|
||||
to: "static",
|
||||
globOptions: {
|
||||
ignore: ["**/*.psd", "**/*1024px.png"],
|
||||
},
|
||||
resolve: {
|
||||
// Add '.ts' and '.tsx' as resolvable extensions.
|
||||
extensions: fileExtensions,
|
||||
plugins: [new TsconfigPathsPlugin({extensions: fileExtensions})],
|
||||
fallback: {
|
||||
"url": false,
|
||||
"fs": false,
|
||||
"https": false,
|
||||
"http": false,
|
||||
"path": false,
|
||||
"timers": false,
|
||||
"stream": require.resolve("stream-browserify"),
|
||||
},
|
||||
{ from: "generated/static", to: "static" },
|
||||
{ from: "issue_template.md" },
|
||||
]}),
|
||||
],
|
||||
},
|
||||
|
||||
module: {
|
||||
rules: [
|
||||
// Quick builds use esbuild, everything else uses `tsc`
|
||||
env.quick ? { test: /\.ts?$/, loader: "esbuild-loader", options: { loader: "ts", target: "firefox68" } } :
|
||||
{ test: /\.ts?$/, loader: "ts-loader" },
|
||||
|
||||
// All output '.js' files will have any sourcemaps re-processed by 'source-map-loader'.
|
||||
{ enforce: "pre", test: /\.js$/, loader: "source-map-loader" },
|
||||
],
|
||||
},
|
||||
|
||||
plugins: [
|
||||
new CopyWebPackPlugin({patterns: [
|
||||
{ from: "src/manifest.json" },
|
||||
{
|
||||
from: "src/static",
|
||||
to: "static",
|
||||
globOptions: {
|
||||
ignore: ["**/*.psd", "**/*1024px.png"],
|
||||
},
|
||||
},
|
||||
{ from: "generated/static", to: "static" },
|
||||
{ from: "issue_template.md" },
|
||||
]}),
|
||||
],
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue