-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"use *.tag.html
extension" rule
#6
Conversation
"use `*.tag.html` extension" rule
Completely agree |
I'm very much keeping this in mind, Works: const riot = require('riot')
const tag = require('my.tag') Fails: const riot = require('riot')
const tag = require('my.tag.html') When you require riot, it makes require aware of files with the |
@adrianblynch good point. I had never tried to import a tag directly. Are you using the actual file basename? Or is it a path ( Is this setup anywhere in the Riot docs? I'm wondering if Riot also has a way to configure the extension in this setup, since it does in the compiler. So that we could do something like this: const riot = require('riot')
riot.settings.ext = 'tag.html' // don't know if this exists, looking for something it
const tag = require('my.tag') Otherwise I think we should add a "browser only" note to this rule in this guide. |
@adrianblynch any chance you are using Webpack with a specific loader? Like this: module: {
loaders: [
{
test: /\.tag$/,
loader: "tag",
exclude: path.resolve(__dirname, "node_modules")
}
]
} So you could change this to module: {
loaders: [
{
test: /\.tag.html$/,
loader: "tag",
exclude: path.resolve(__dirname, "node_modules")
}
]
} |
Hi @jbmoelker - We are using webpack but in this case it was requiring in tags, |
Resolves issue mentioned as comment: #6 (comment)
Resolves issue mentioned as comment: #6 (comment)
Summary
Proposed changes:
*.tag.html
extension" rule (incl. summary, why and how).Checklist