-
Notifications
You must be signed in to change notification settings - Fork 3
/
playroom.config.js
55 lines (53 loc) · 1.43 KB
/
playroom.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
const path = require("path");
const CopyPlugin = require("copy-webpack-plugin");
module.exports = {
components: "./src/playroom/components.ts",
outputPath: "./dist/playroom",
title: "Demo Playroom",
themes: "./src/playroom/themes/index.ts",
snippets: "./src/playroom/snippets.ts",
frameComponent: "./src/playroom/FrameComponent.tsx",
// scope: './playroom/useScope.js',
widths: [425, 768, 1440],
port: 9000,
openBrowser: true,
paramType: "search", // default is 'hash'
exampleCode: `
<Button
href="#"
icon="chevron-right"
label="More info"
/>
`,
baseUrl: "/playroom/",
iframeSandbox: "allow-scripts",
typeScriptFiles: ["src/components/**/*.{ts,tsx}", "!**/node_modules"],
webpackConfig: () => ({
plugins: [
new CopyPlugin({
patterns: [
"static",
],
}),
],
module: {
rules: [
{
test: /\.(js|jsx|ts|tsx)$/,
exclude: /node_modules\/(?!(@kickstartds)\/).*/,
use: ["babel-loader"],
},
{
test: /\.css$/,
use: ["style-loader", { loader: "css-loader", options: { url: false } }],
exclude: /node_modules\/(?!(@kickstartds)\/).*/,
},
{
test: /\.scss$/,
use: ["style-loader", { loader: "css-loader", options: { url: false } }, "sass-loader"],
exclude: /node_modules\/(?!(@kickstartds)\/).*/,
},
],
},
}),
};