vargburz
1 year ago
7 changed files with 52 additions and 10 deletions
@ -0,0 +1,40 @@
|
||||
const path = require('path'); |
||||
|
||||
function resolve(dir) { |
||||
return path.join(__dirname, '..', dir) |
||||
} |
||||
|
||||
module.exports = { |
||||
context: resolve('example'), |
||||
entry: './example_pod.ts', |
||||
plugins: [], |
||||
devtool: 'inline-source-map', |
||||
watch: true, |
||||
mode: 'development', |
||||
module: { |
||||
rules: [ |
||||
{ |
||||
test: /\.ts$/, |
||||
use: 'ts-loader', |
||||
exclude: /node_modules/ |
||||
}, |
||||
{ |
||||
test: /\.css$/, |
||||
use: [ |
||||
{ loader: 'style-loader', options: { injectType: 'lazyStyleTag' } }, |
||||
'css-loader', |
||||
], |
||||
exclude: /node_modules/ |
||||
} |
||||
], |
||||
}, |
||||
resolve: { |
||||
extensions: ['.ts', '.js'], |
||||
}, |
||||
output: { |
||||
filename: 'example.js', |
||||
path: resolve('example/dist'), |
||||
libraryTarget: 'umd', |
||||
umdNamedDefine: true |
||||
} |
||||
}; |
@ -0,0 +1,5 @@
|
||||
### HOW TO RUN |
||||
|
||||
run `yarn run dev` and `yarn run demo` in separate terminals simultaneously. |
||||
|
||||
open `example.html` in your browser. |
Loading…
Reference in new issue