Skip to content

Commit

Permalink
feat: add lit-element, basic Typescript support to Webpack
Browse files Browse the repository at this point in the history
  • Loading branch information
sghoweri committed Oct 19, 2019
1 parent c8886b6 commit 611f705
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/uikit-workshop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"repository": "https://github.com/pattern-lab/patternlab-node/tree/master/packages/uikit-workshop",
"bugs": "https://github.com/pattern-lab/patternlab-node/issues",
"devDependencies": {
"lit-element": "^2.2.1",
"@svgr/webpack": "^4.1.0",
"autoprefixer": "^9.1.0",
"babel-loader": "^8.0.2",
Expand Down Expand Up @@ -56,6 +57,7 @@
"workbox-build": "^3.4.1"
},
"dependencies": {
"ts-loader": "^6.2.0",
"@babel/core": "^7.5.4",
"@babel/plugin-proposal-class-properties": "^7.5.0",
"@babel/plugin-proposal-decorators": "^7.4.4",
Expand Down
28 changes: 28 additions & 0 deletions packages/uikit-workshop/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"include": [
"src"
],
"exclude": [
"dist"
],
"compilerOptions": {
"noEmit": true,
"allowJs": true,
"checkJs": true,
"allowSyntheticDefaultImports": true,
"outDir": "dist",
"resolveJsonModule": true,
"skipLibCheck": true,
"target": "esnext",
"jsx": "react",
"module": "esnext",
"lib": ["es2017", "dom"],
"sourceMap": true,
"moduleResolution": "node",
"experimentalDecorators": true,
"baseUrl": "src/scripts"
},
"typeAcquisition": {
"enable": true
}
}
12 changes: 12 additions & 0 deletions packages/uikit-workshop/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,18 @@ module.exports = function() {
},
module: {
rules: [
{
test: /\.(ts|tsx)$/,
use: [
{
loader: 'ts-loader',
options: {
transpileOnly: true,
experimentalWatchApi: true,
},
},
],
},
{
test: /\.html$/,
use: [
Expand Down

0 comments on commit 611f705

Please sign in to comment.