Compare commits

...

4 Commits

Author SHA1 Message Date
Aakansha Doshi
09daff487a Merge remote-tracking branch 'origin/master' into aakansha-sm 2021-01-21 13:15:32 +05:30
Aakansha Doshi
17330c4c03 fix 2021-01-20 21:21:50 +05:30
Aakansha Doshi
2a4ad6fc41 upload sourcemaps to cdn 2021-01-20 21:20:28 +05:30
Aakansha Doshi
ec6999554a build(webpack): attach sourcemaps so it helps in debugging 2021-01-20 01:58:45 +05:30
2 changed files with 16 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@excalidraw/excalidraw", "name": "@excalidraw/excalidraw",
"version": "0.2.1", "version": "0.2.2",
"main": "dist/excalidraw.min.js", "main": "dist/excalidraw.min.js",
"files": [ "files": [
"dist/*" "dist/*"

View File

@ -2,6 +2,7 @@ const path = require("path");
const TerserPlugin = require("terser-webpack-plugin"); const TerserPlugin = require("terser-webpack-plugin");
const BundleAnalyzerPlugin = require("webpack-bundle-analyzer") const BundleAnalyzerPlugin = require("webpack-bundle-analyzer")
.BundleAnalyzerPlugin; .BundleAnalyzerPlugin;
const webpack = require("webpack");
module.exports = { module.exports = {
mode: "production", mode: "production",
@ -24,7 +25,16 @@ module.exports = {
{ {
test: /\.(sa|sc|c)ss$/, test: /\.(sa|sc|c)ss$/,
exclude: /node_modules/, exclude: /node_modules/,
use: ["style-loader", { loader: "css-loader" }, "sass-loader"], use: [
"style-loader",
{
loader: "css-loader",
options: {
sourceMap: false,
},
},
"sass-loader",
],
}, },
{ {
test: /\.(ts|tsx|js|jsx|mjs)$/, test: /\.(ts|tsx|js|jsx|mjs)$/,
@ -89,6 +99,10 @@ module.exports = {
}, },
plugins: [ plugins: [
...(process.env.ANALYZER === "true" ? [new BundleAnalyzerPlugin()] : []), ...(process.env.ANALYZER === "true" ? [new BundleAnalyzerPlugin()] : []),
new webpack.SourceMapDevToolPlugin({
filename: "sourcemaps/[name].js.map",
publicPath: "https://unpkg.com/@excalidraw/excalidraw@0.2.2/dist/",
}),
], ],
externals: { externals: {
react: { react: {