2.2.23 • Published 6 months ago

reacton-loader v2.2.23

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

reacton-loader

Loader for single-file Reacton components in Webpack

Install

npm i reacton-loader -D

A fragment of the working project is shown below:

webpack.config.js

module: {
  rules: [
    {
      test: /\.htm$/,
      loader: 'reacton-loader',
    },
    ... // other rules
  ]
},

Mixins.js

export default class {
  getStringInUpperCase(str) {
    return str.toLocaleUpperCase()
  }
}

MyComponent.htm

<my-component>
  <h1>Hello, {{ getStringInUpperCase(message) }}!</h1>
        
  <style>
    h1 {
      color: {{ color }};
    }
  </style>

  <script>
    import Mixins from '../Mixins'

    exports = class extends Mixins {
      constructor(props) {
        super()
        this.message = 'Reacton'
        this.color = props.color
      }

      static mode = 'open' // add Shadow DOM
    }
  </script>
</my-component>
2.2.17

7 months ago

2.2.18

7 months ago

2.2.15

7 months ago

2.2.3

7 months ago

2.2.16

7 months ago

2.2.2

7 months ago

2.2.5

7 months ago

2.2.14

7 months ago

2.2.4

7 months ago

2.2.11

7 months ago

2.2.7

7 months ago

2.2.12

7 months ago

2.2.6

7 months ago

2.2.10

7 months ago

2.2.9

7 months ago

2.2.8

7 months ago

2.2.19

7 months ago

2.2.23

6 months ago

2.2.20

7 months ago

2.2.21

6 months ago

2.2.1

7 months ago

2.2.0

7 months ago

2.1.1

7 months ago

2.1.0

7 months ago

2.0.2

7 months ago

2.0.1

7 months ago

2.0.0

7 months ago

1.1.0

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago