Skip to content

Commit

Permalink
feat: remove virtual module plugin, much refactoring, webpack 5 suppo…
Browse files Browse the repository at this point in the history
…rt (#48)

BREAKING CHANGE: drop Marko 4 support
  • Loading branch information
DylanPiercey committed Feb 2, 2021
1 parent a21d028 commit c8da6e7
Show file tree
Hide file tree
Showing 100 changed files with 12,290 additions and 10,398 deletions.
7 changes: 6 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ module.exports = {
"prettier/@typescript-eslint"
],
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-use-before-define": "off"
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unsafe-call": "off"
}
};
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"arrowParens": "avoid",
"trailingComma": "none"
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ export default [

# Installation

> `@marko/webpack` >= 7 Only supports Marko 5+.
> For Marko 4 support use `@marko/webpack@6`.
```console
npm install @marko/webpack
```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
$ const { entry, manifest, types, scriptAttrs, styleAttrs } = input;
import manifest from "!!@marko/webpack/loader!?manifest";
$ const { entry, scriptAttrs, styleAttrs } = input;
$ const assets = manifest.getAssets(entry, out.global.buildName);

<if(assets.js)>
Expand Down
5 changes: 5 additions & 0 deletions components/webpack-assets/marko-tag.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"@entry": "string",
"@scriptAttrs": "object",
"@styleAttrs": "object"
}
8 changes: 1 addition & 7 deletions marko.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
{
"<head>": {
"transformer": "./dist/components/head/transformer.js"
},
"<webpack-assets>": {
"template": "./dist/components/webpack-assets/index.marko",
"transformer": "./dist/components/webpack-assets/transformer.js"
}
"tags-dir": "./components"
}
Loading

0 comments on commit c8da6e7

Please sign in to comment.