Comments (2)
@richardspence ? Either import template from 'raw-loader!./file.html
or add raw-loader
to webpack.config.js
and import template from './template.html'
should work . But not both 😛
from raw-loader.
Ahh figured it out. I had added this in the webpack.conf trying to get it to work, and this causes the duplicate module.exports:
module: {
rules: [
{
test: /\.html?$/,
use: 'raw-loader'
}
]
},
so I removed that section.
from raw-loader.
Related Issues (20)
- [question] how to use the new asset modules with inline requires like you could with raw loader HOT 9
- raw-loader returns export string instead of file content HOT 1
- Export incompatibility with raw-loader and awesome-typescript-loader HOT 3
- The variable contains the path to the file instead of the text HOT 4
- Cannot import file using typescript HOT 6
- Imported string contains module.exports HOT 4
- Module parse failed: Unexpected token m in JSON at position 0 while parsing near 'module.exports = "{\...' HOT 5
- raw-loader 2.0 not working with pug-html-loader HOT 8
- Not working with require statements HOT 12
- Warning/Failure Using Raw Loader 2.0.0 in Angular CLI HOT 4
- error when using with SCSS and angular7 HOT 6
- Angular and Styles HOT 2
- The template specified for component AppComponent is not a string HOT 3
- version 2.0.0 breaks ng Angular 8 -> webpack in my project HOT 5
- You may need an appropriate loader to handle this file type. HOT 3
- [Bug Report] raw-loader failed to load *.json HOT 2
- Can raw-loader catch all HOT 3
- `Module not found` when using TypeScript project references HOT 2
- Module Not Found HOT 1
- Watch not working HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from raw-loader.