Ivan Polyakov
2 years ago
6 changed files with 2348 additions and 0 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,17 @@ |
|||||||
|
{ |
||||||
|
"name": "sxml-loader-example", |
||||||
|
"version": "1.0.0", |
||||||
|
"private": true, |
||||||
|
"description": "", |
||||||
|
"main": "src/index.js", |
||||||
|
"scripts": { |
||||||
|
"build": "webpack --mode=development" |
||||||
|
}, |
||||||
|
"author": "Ivan Polyakov", |
||||||
|
"license": "MIT", |
||||||
|
"devDependencies": { |
||||||
|
"html-loader": "^4.2.0", |
||||||
|
"html-webpack-plugin": "^5.5.0", |
||||||
|
"webpack": "^5.74.0" |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,5 @@ |
|||||||
|
'((html |
||||||
|
(head |
||||||
|
(title "Hello")) |
||||||
|
(body |
||||||
|
(h1 "Hello World!")))) |
@ -0,0 +1,27 @@ |
|||||||
|
const path = require('path'); |
||||||
|
const HtmlWebpackPlugin = require('html-webpack-plugin'); |
||||||
|
|
||||||
|
module.exports = { |
||||||
|
module: { |
||||||
|
rules: [ |
||||||
|
{ |
||||||
|
test: /\.sxml$/, |
||||||
|
use: ['html-loader', 'sxml-loader'], |
||||||
|
}, |
||||||
|
], |
||||||
|
}, |
||||||
|
resolveLoader: { |
||||||
|
alias: { |
||||||
|
'sxml-loader': path.resolve(__dirname, '../src/loader.js'), |
||||||
|
}, |
||||||
|
}, |
||||||
|
plugins: [ |
||||||
|
new HtmlWebpackPlugin({ |
||||||
|
inject: 'body', |
||||||
|
scriptLoading: 'blocking', |
||||||
|
template: 'src/index.sxml', |
||||||
|
filename: 'index.html', |
||||||
|
minify: false, |
||||||
|
}), |
||||||
|
], |
||||||
|
} |
Loading…
Reference in new issue